Slider Comfortable

Settings-panel-style discrete selector. Pips mode trades the continuous track for dot indicators at every step — pick-a-value-from-N affordance. Scrubber mode swaps the same labeled layout onto a continuous track.

Install

import { SliderComfortable } from '$lib/components/ui/slider-comfortable';

Pips

Default variant. Pips on the left of the thumb fill with --primary; the current step reads as --foreground; pips to the right stay muted. Hover the container to see the label lift from muted to foreground.

Roundness 2

Pips with Format

Pair with formatValue to map numeric steps to labels — useful for enumerated settings like quality presets.

Quality High

Scrubber

variant="scrubber" swaps the pips for a continuous track + range + thumb — drag-anywhere on the track. Same labeled layout, denser values.

Volume 48%

Disabled

Roundness 1
Volume 40%

API reference

Comfortable owns its own labeled layout — diverges from the thin-wrapper <Slider> on purpose. Single-thumb only; range and vertical orientations are deferred.

PropTypeDescription
'pips' | 'scrubber'Interaction model. Pips renders a dot at each step (discrete pick). Scrubber renders a continuous track + thumb.
number (bindable)Current step or position. Two-way bindable.
numberLower bound.
numberUpper bound.
numberIncrement between snapped values. In pips mode, determines the dot count.
stringLeft-aligned text label. Also passed as aria-label to the thumb.
(v: number) => stringRight-aligned value formatter. Map numeric steps to labels for enumerated settings.
booleanDisables interaction; root drops to 50% opacity and pointer-events go to none.
(v: number) => voidFires on every value change while dragging or stepping.
(v: number) => voidFires once on drag end (commit).
HTMLSpanElement | nullTwo-way-bindable reference to the inner bits-ui Slider.Root element.
stringMerged onto the outer container via tailwind-merge.