Slider
A value along a range, picked by dragging.
Import
import {Slider} from '@hzblj/kara-ui'Examples
Stepped
<Slider max={10} min={0} onValueChange={setRating} step={1} value={rating} />Props
SwiftUI Slider / Compose's Material Slider, tinted fill.accent.primary.
| Prop | Type | Default | Description |
|---|---|---|---|
| value* | number | — | Between |
| disabled | boolean | false | Stops the user moving the thumb, and dims the slider. |
| max | number | 1 | The upper end. |
| min | number | 0 | The lower end. |
| onValueChange | (value: number) => void | — | Called with the new value as the thumb moves. |
| step | number | — | The increment between stops; leave it unset for a continuous slider. On Android every stop plays a |
Between min and max. Controlled: pass back what onValueChange reports.
Stops the user moving the thumb, and dims the slider.
The upper end. 1 by default.
The lower end. 0 by default.
Called with the new value as the thumb moves.
The increment between stops; leave it unset for a continuous slider. On Android every stop plays a tick.
Platform notes
- A stepped slider ticks at every stop on Android; iOS 26’s slider plays its own.