Slider
A styled range input with an optional formatted value.
import
import { Slider } from '@joshicodes/cock';Formatted
Morning crow volume 65%
API
Read out of the component sources at build time, so it matches the version you installed.
Every component also takes class, merged
through tailwind-merge so your utility wins.
Props of Slider
| Prop | Type | Default |
|---|---|---|
value bindable | number | 50 |
min | number | 0 |
max | number | 100 |
step | number | 1 |
disabled | boolean | false |
showValue Show the current value above the track. | boolean | false |
format | (value: number) => string | (v: number) => String(v) |
label | string | — |
class | string | — |
Events of Slider
| Event | Type | Default |
|---|---|---|
onchange | (value: number) => void | — |