Forms Form-associated
RangeSlider <pm-range-slider>
Two-thumb range slider (price filters, time windows).
Sizes
Set with the size attribute; controls keep touch-sized targets on phones.
size="sm"size="md"size="lg"Tones
Set tone on the element, or data-tone on any ancestor to tone a whole area.
tone="accent"tone="secondary"tone="neutral"tone="success"tone="warning"tone="danger"tone="info"States
Each state is one attribute.
DisabledRead-onlyErrorWith a hintOverview
Value is "low,high"; with name both numbers are submitted under that name. Thumbs never cross and keep min-gap apart. Each thumb is a native range input (full keyboard support), labelled "Minimum …" / "Maximum …".
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
value | string | — | "low,high". |
name | string | — | Form field name: both numbers are submitted under it. |
label | string | — | Visible label (use hide-label to hide it visually). |
hint | string | — | Help text under the slider, linked to it for screen readers. |
min | number | 0 | Lowest value. |
max | number | 100 | Highest value. |
step | number | 1 | Distance between allowed values. |
min-gapprop: minGap | number | 0 | Smallest allowed distance between the thumbs. |
show-valueprop: showValue | boolean | false | Show the chosen range as text next to the label. |
disabled | boolean | false | Not interactive and not submitted. |
unit | string | — | Text after values in the output, e.g. "€" or " km". |
error | string | — | Custom error message. Setting it marks the field invalid. |
size | 'sm' | 'md' | 'lg' | — | Thumb and track size. |
hide-labelprop: hideLabel | boolean | false | Hide the label visually; it stays the accessible name. |
readonly | boolean | false | Focusable and submitted, but the user cannot change the value. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-input | onPmInput | While dragging. |
pm-change | onPmChange | When committed. |
Methods
checkValidity(), reportValidity(), validate()