Skip to content

Forms

ISlider ​

A control for a value where the approximate size matters more than the exact number — volume, opacity, a price ceiling. Where a precise figure is typed, use INumberInput.

Volume60

The model keeps its shape ​

Pass a number and you get a number back; pass an array and you get an array.

ts
const volume = ref(60) //        → 60
const price = ref([200, 750]) // → [200, 750]

Range ​

Two thumbs on one track. minStepsBetweenThumbs keeps them from crossing or stacking.

Price$200 – $750
$0$1000

Formatting ​

formatValue drives the displayed value, the scale captions and each thumb's accessible label at once.

Opacity40%
0%100%

Steps ​

A coarse step turns the track into a small set of choices. Use formatValue to name them rather than showing the raw index.

Export qualityHigh

Sizes ​

The track and thumb scale together, with the thumb staying larger than the track at every size.

Small
Medium
Large

Vertical ​

orientation="vertical" stands the track up. showScale is horizontal only.

Level65

Saving on release ​

update:modelValue fires on every step; valueCommit fires once, when the drag or key repeat ends. Send the committed value to the server.

Threshold50

Last saved: 50

Disabled ​

Volume40

Accessibility ​

The name lands on the thumb, which is the element carrying role="slider". With a label, a single thumb takes the label and a range names each end after it — "Price minimum", "Price maximum". Rename those ends with rangeLabels:

vue
<ISlider v-model="price" label="Preis" :range-labels="['von', 'bis']" />

Without a label, each thumb falls back to its own formatted value. Arrow keys step by step, Home and End jump to min and max, and PageUp/PageDown move in larger jumps.

Props ​

PropTypeDefaultDescription
modelValuenumber | number[] | nullminOne thumb for a number, one per entry for an array
minnumber0
maxnumber100
stepnumber1
minStepsBetweenThumbsnumber—Keeps range thumbs from crossing
orientation'horizontal' | 'vertical''horizontal'
invertedbooleanfalseFills from the far end
disabledbooleanfalse
size'sm' | 'md' | 'lg''md'
labelstring—Shown above the track and used as the accessible name
showValuebooleanfalseShow the current value beside the label
showScalebooleanfalsemin/max captions under the track; horizontal only
formatValue(value: number) => stringStringDrives the value, the scale and the thumb labels
rangeLabels[string, string]['minimum', 'maximum']How each end of a range is named
unstyledboolean—Skip built-in classes
uiRecord<string, string>—Per-element class overrides

Events ​

EventPayloadDescription
update:modelValuenumber | number[]Every step, as the value changes
valueCommitnumber | number[]Once, when the interaction ends

Slots ​

SlotPropsDescription
label—Replaces the label text
value{ values, text }Replaces the value readout

Styling ​

Slots: root, header, label, value, slider, track, range, thumb, scale.

Custom