MindeesUI
ComponentsForms

Slider

A draggable single-value slider with min, max, optional step snapping, and a continuous change callback.

Slider is a gesture-driven track and thumb for picking a value in [min, max]. It fires onChange continuously while dragging and onChangeEnd once the gesture finishes. Setting step snaps to discrete increments; leaving it 0 keeps the track continuous.

Import

import { Slider } from '@mindees/ui';

Usage

<Slider value={volume} onChange={setVolume} min={0} max={100} step={5} />

Props

PropTypeDefaultDescription
valuenumber0Current value. Clamped into [min, max].
onChange(value: number) => voidFired continuously as the thumb is dragged.
onChangeEnd(value: number) => voidFired once when the drag gesture ends.
minnumber0Lower bound.
maxnumber1Upper bound.
stepnumber0Step granularity; 0 means continuous.
disabledbooleanfalseIgnore gestures and dim the track and thumb.
accessibilityLabelstringAccessible name for the slider.
styleStyleProp<ViewStyle>Style applied to the root container.

Accessibility

The root uses accessibilityRole="adjustable" and exposes accessibilityValue with min, max, and the current now, plus a disabled state. Provide accessibilityLabel so the slider's purpose is announced.

On this page