dashed/livewire-range-slider
A Livewire range slider component for Laravel, letting you add dual-handle range inputs with reactive values bound to your components. Configure min, max, step, and formatting, then drop it into any Blade view without writing custom JavaScript.
Install and register.
composer require dashed/livewire-range-slider
Then publish any bundled assets/config if the README calls for it:
php artisan vendor:publish --tag=livewire-range-slider-assets
php artisan vendor:publish --tag=livewire-range-slider-config
(Confirm the exact tag names in the repo's README — small packages often ship a single vendor:publish prompt instead.)
Where to look first. Open src/ for the Livewire component class (likely RangeSlider.php) and resources/views/ for the Blade view. That tells you the public properties (min, max, step, and the bound value(s)), the emitted events, and whether it wraps a JS library like noUiSlider or ion-rangeslider. Read the view before writing any markup — the prop names and wire:model target are defined there, not in prose docs.
First use case: a price filter. The fastest win is a listing page where users narrow results by a numeric range. Set the slider's bounds from the actual data, bind the selected value(s) to a Livewire property, and re-query in updated():
<livewire:range-slider
wire:model.live.debounce.400ms="priceRange"
:min="0"
:max="2000"
:step="50"
/>
public array $priceRange = [0, 2000];
public function updatedPriceRange(): void
{
$this->results = Product::whereBetween('price', $this->priceRange)->get();
}
Because this package has zero stars and zero dependents, treat the README as the source of truth and prototype the above in a throwaway route before committing to it.
[min, max]) rather than two scalars so the whole selection updates atomically and you avoid double re-renders. If the component uses two props instead, keep them in sync in a single updated* handler.wire:model.live.debounce.300ms (or .blur for cheaper UX) on the slider. Dragging a handle fires continuously; without debounce you'll flood the server with requests and see visible lag.#[Url] attribute so filters survive refresh and are shareable:
#[Url(as: 'price')]
public array $priceRange = [0, 2000];
resources/views/components/ that forwards props and applies your design-system styling, so upstream changes to the package's markup don't ripple through every view.whereBetween on every debounce is fine for small tables; for large ones, cache the min/max bounds (Product::min('price')) rather than querying them per render.@push in your layout. This is the single most common failure with small Livewire UI packages.wire:key to the component (and to any list item containing one) and confirm the package re-initialises on livewire:navigated / morph.updated; if not, you'll need to hook Alpine's x-init or a MutationObserver.[min, max]. Passing null or a single scalar can silently render a broken handle — set defaults in mount().wire:model semantics, wire:model.live and $wire calls may not behave as expected. Pin the version and note it in your project.public; check the network payload for the slider value; use Livewire DevTools to inspect the re-render; then check the browser console for the JS library's own errors (usually "container not found").:options prop rather than forking. If no passthrough exists, overriding the published Blade view is the lighter-touch fork.How can I help you explore Laravel packages today?