An accessible range input with a custom styled track, fill, and thumb. Supports sizes, colors, and Livewire binding.
A simple slider with a label and value display. The current value is shown on the right and updates as you drag.
<x-ui::slider label="Volume" value="40" />
Three track and thumb sizes to fit different UI contexts.
<x-ui::slider label="Small" size="sm" value="30" />
<x-ui::slider label="Medium" size="md" value="55" />
<x-ui::slider label="Large" size="lg" value="75" />
Use the color prop to change the fill and thumb accent color.
<x-ui::slider color="primary" label="Primary" value="60" />
<x-ui::slider color="green" label="Green" value="45" />
<x-ui::slider color="red" label="Red" value="70" />
<x-ui::slider color="yellow" label="Yellow" value="35" />
<x-ui::slider color="sky" label="Sky" value="55" />
Bind the slider to a Livewire property using wire:model.live. The server-side value updates in real time as you drag.
Server value: 40
Server value: 70
Server value: 55
// Livewire component
public int $volume = 40;
// Template
<x-ui::slider
label="Volume"
wire:model.live="volume"
:min="0"
:max="100"
/>
<p>Current value: {{ $volume }}</p>
Add the disabled attribute to prevent interaction. The slider renders at reduced opacity.
<x-ui::slider label="Disabled" value="60" disabled />
A stepped slider that renders a tick mark and optional label at every stop. Active ticks are colored, inactive ones are gray.
Set step to control the number of stops. Boundary ticks are slightly taller than intermediate ones.
<x-ui::slider-tick label="Progress" value="50" :step="25" />
Adjust step, min, and max to define the stops. Keep the tick count manageable — aim for 5–11 stops.
{{-- 5 stops: 0, 25, 50, 75, 100 --}}
<x-ui::slider-tick label="Quarter steps" value="50" :step="25" />
{{-- 11 stops: 0, 10, 20 ... 100 --}}
<x-ui::slider-tick label="Decade steps" value="40" :step="10" />
{{-- Rating 1–5 --}}
<x-ui::slider-tick label="Rating" :min="1" :max="5" :step="1" value="3" color="yellow" />
The color prop colors the fill, thumb, and active tick marks together.
<x-ui::slider-tick color="primary" label="Primary" value="50" :step="25" />
<x-ui::slider-tick color="green" label="Green" value="25" :step="25" />
<x-ui::slider-tick color="red" label="Red" value="75" :step="25" />
<x-ui::slider-tick color="yellow" label="Yellow" value="50" :step="25" />
<x-ui::slider-tick color="sky" label="Sky" value="100" :step="25" />
Works the same as the regular slider — bind with wire:model.live and the server value updates on every step.
Server value: 40
// Livewire component
public int $volume = 40;
// Template
<x-ui::slider-tick
label="Volume"
wire:model.live="volume"
:min="0"
:max="100"
:step="20"
/>
<p>Server value: {{ $volume }}</p>
Set :showLabels="false" to render tick marks only, without the value labels below.
<x-ui::slider-tick label="Compact" value="50" :step="25" :showLabels="false" />