Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Forms Form-associated

RangeSlider <pm-range-slider>

Two-thumb range slider (price filters, time windows).

Full screen

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/range-slider'; </script> <pm-range-slider label="Price" min="0" max="500" step="10" value="100,350" unit=" €" show-value></pm-range-slider>

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.

Disabled
Read-only
Error
With a hint

Overview

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

AttributeTypeDefaultDescription
valuestring—"low,high".
namestring—Form field name: both numbers are submitted under it.
labelstring—Visible label (use hide-label to hide it visually).
hintstring—Help text under the slider, linked to it for screen readers.
minnumber0Lowest value.
maxnumber100Highest value.
stepnumber1Distance between allowed values.
min-gap
prop: minGap
number0Smallest allowed distance between the thumbs.
show-value
prop: showValue
booleanfalseShow the chosen range as text next to the label.
disabledbooleanfalseNot interactive and not submitted.
unitstring—Text after values in the output, e.g. "€" or " km".
errorstring—Custom error message. Setting it marks the field invalid.
size'sm' | 'md' | 'lg'—Thumb and track size.
hide-label
prop: hideLabel
booleanfalseHide the label visually; it stays the accessible name.
readonlybooleanfalseFocusable 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

EventReact / Svelte propDescription
pm-inputonPmInputWhile dragging.
pm-changeonPmChangeWhen committed.

Methods

checkValidity(), reportValidity(), validate()