PHPackages                             benjaminhansen/filament-range-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. benjaminhansen/filament-range-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

benjaminhansen/filament-range-field
===================================

The missing range/slider field for the Filament forms. Updated for Laravel 11.

v0.0.1(1y ago)0107MITPHPPHP ^8.0

Since Jan 28Pushed 1y agoCompare

[ Source](https://github.com/benjaminhansen/filament-range-field)[ Packagist](https://packagist.org/packages/benjaminhansen/filament-range-field)[ Docs](https://github.com/yepsua/filament-range-field)[ RSS](/packages/benjaminhansen-filament-range-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (2)Used By (0)

The missing range field for the Filament forms.
===============================================

[](#the-missing-range-field-for-the-filament-forms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d9f21b236e20299b8c7b29a1964d87e0fa149ed6f5fc221eea5c3f4bc1f1294d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7965707375612f66696c616d656e742d72616e67652d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yepsua/filament-range-field)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6f6bcbb65a3d652915e047633ebc0ffbfdf630b9e9d4f9229972b51ec9add776/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7965707375612f66696c616d656e742d72616e67652d6669656c642f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/yepsua/filament-range-field/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/81c17ce578e8f5be9b2daa0f3f6c483e296434130dc4148ceb7d097a05201697/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7965707375612f66696c616d656e742d72616e67652d6669656c642f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/yepsua/filament-range-field/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/8d8903aee46fc1a9c3b3a64e1040f36aef1251ec6fe1214fef4e6efc2f1872a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7965707375612f66696c616d656e742d72616e67652d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yepsua/filament-range-field)

 [![](https://user-images.githubusercontent.com/1541517/168745619-aeb1370a-e8a9-4d14-bf1e-a45fcae9078b.png)](https://user-images.githubusercontent.com/1541517/168745619-aeb1370a-e8a9-4d14-bf1e-a45fcae9078b.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require yepsua/filament-range-field
```

Publish the assets:

```
php artisan filament:assets
```

You must see something like in the console:

```
php artisan filament:assets

...
public/css/yepsua/filament-range-field/range-input-component.css
...
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-range-field-views"
```

Basic usage
-----------

[](#basic-usage)

By default the range is used to get value from 0 to 100.

```
use Yepsua\Filament\Forms\Components\RangeSlider

...
    protected function getFormSchema(): array
    {
        return [
            ...
            RangeSlider::make('range')
            ...
        ];
    }
...
```

 [![](https://user-images.githubusercontent.com/1541517/168742559-97297ba2-af11-4742-b388-f9fcef0cfa78.png)](https://user-images.githubusercontent.com/1541517/168742559-97297ba2-af11-4742-b388-f9fcef0cfa78.png)

Defining the steps:

```
use Yepsua\Filament\Forms\Components\RangeSlider

...
    protected function getFormSchema(): array
    {
        return [
            ...
            RangeSlider::make('range')->steps([
                'A', // should get value: 1 for the A
                'B', // should get value: 2 for the B
                'C', // should get value: 3 for the C
                'D'  // should get value: 4 for the D
            ])
            ...
        ];
    }
...
```

 [![](https://user-images.githubusercontent.com/1541517/168742589-87859e0b-dd9e-46df-a5da-244f6b7e8e6d.png)](https://user-images.githubusercontent.com/1541517/168742589-87859e0b-dd9e-46df-a5da-244f6b7e8e6d.png)

### Associative Array:

[](#associative-array)

```
use Yepsua\Filament\Forms\Components\RangeSlider

...
    protected function getFormSchema(): array
    {
        return [
            ...
            RangeSlider::make('range')->steps([
                '25'  => 'A', // should get value: 25  for the A
                '50'  => 'B', // should get value: 50  for the B
                '75'  => 'C', // should get value: 75  for the C
                '100' => 'D'  // should get value: 100 for the D
            ])
            ...
        ];
    }
...
```

 [![](https://user-images.githubusercontent.com/1541517/168742589-87859e0b-dd9e-46df-a5da-244f6b7e8e6d.png)](https://user-images.githubusercontent.com/1541517/168742589-87859e0b-dd9e-46df-a5da-244f6b7e8e6d.png)

### Hide the Step List:

[](#hide-the-step-list)

```
use Yepsua\Filament\Forms\Components\RangeSlider

...
    protected function getFormSchema(): array
    {
        return [
            ...
            RangeSlider::make('range')->steps([
                'A',
                'B',
                'C',
                'D'
            ])->displaySteps(false)
            ...
        ];
    }
...
```

**📕 Note:** The step value is defined by the first item in the steps array, Ex. =&gt; \[25, 50, 75, 100\] the step value should be 25. However if you need to define any other step value you can use the setter *step*.

```
    RangeSlider::make('range')->steps([
        0 => '0',
        25 => '25',
        50 => '50',
        75 => '75',
        100 => '100'
    ])->step(25)
    ...
```

 [![](https://user-images.githubusercontent.com/1541517/168746120-1dfe2a03-86d9-4dca-8068-a3e71b9937f4.png)](https://user-images.githubusercontent.com/1541517/168746120-1dfe2a03-86d9-4dca-8068-a3e71b9937f4.png)

The same case applies for the *min* and *max* setters:

```
    RangeSlider::make('range')->min(25)->max(75)->step(5)
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/master/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Omar Yepez](https://github.com/oyepez003)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

475d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac0d1695abbb15119d36a62efc555e66406f6d4396a6bc81814ec3eff417312c?d=identicon)[benjaminhansen](/maintainers/benjaminhansen)

---

Top Contributors

[![oyepez003](https://avatars.githubusercontent.com/u/1541517?v=4)](https://github.com/oyepez003 "oyepez003 (35 commits)")[![benjaminhansen](https://avatars.githubusercontent.com/u/17499722?v=4)](https://github.com/benjaminhansen "benjaminhansen (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![devadattas](https://avatars.githubusercontent.com/u/56180?v=4)](https://github.com/devadattas "devadattas (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![mohamedsabil83](https://avatars.githubusercontent.com/u/10126040?v=4)](https://github.com/mohamedsabil83 "mohamedsabil83 (1 commits)")

---

Tags

laravelyepsuafilament-range-field

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/benjaminhansen-filament-range-field/health.svg)

```
[![Health](https://phpackages.com/badges/benjaminhansen-filament-range-field/health.svg)](https://phpackages.com/packages/benjaminhansen-filament-range-field)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
