Slider
A native range with a value that rides the thumb; end labels and locale digits (Persian) while dragging.
Real scenarios
The component as it is used in a product — not a specimen grid.
The ad budget that re-prices the month
The daily cap rides wire:model.live, so the thirty-day estimate rolls while you drag — and the value on the thumb stays put (show-value) with Persian digits straight from the locale.
Daily cap: 350 k tomans · 30-day estimate: 10.5 M tomans
A podcast speed dial with decimals
Steps of ۰٫۰۵ with two decimal places — the keyboard arrows nudge by exactly one step, and the episode’s remaining time is re-cut live. Native input type=range, so every shortcut you already know works.
Speed 1.00× · a 42-minute episode finishes in 42 minutes listens through.
The thermostat panel
Two dials of one device: the target temperature in half-degree steps and the fan in three gears. No show-value here — the bubble only visits while you hover or focus, then gets out of the way; the live summary below carries the numbers for screen readers too.
Heating to 22.5° · fan medium
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| label | string | null | The range’s accessible name (aria-label) — required for screen readers. |
| showValue | bool | false | Keeps the value riding the thumb on screen; without it, it only appears on hover/focus. |
| startLabel / endLabel | string | null | Labels at both ends of the track (like Calm and Fast). |
| decimals | int | null | Decimal places of the shown value. |
| min / max / step | string|number | 0 / 100 / 1 | Land straight on the native input like any attr; the arrow keys move exactly one step. |
Snippet
<x-nx::slider label="سقف مصرف" showValue start-label="۱۰" end-label="۵۰۰"
min="10" max="500" step="10" wire:model.live="state.budget" />