Skip to content
Forms

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

PropTypeDefault
value bindable
number50
min
number0
max
number100
step
number1
disabled
booleanfalse
showValue

Show the current value above the track.

booleanfalse
format
(value: number) => string(v: number) => String(v)
label
string—
class
string—

Events of Slider

EventTypeDefault
onchange
(value: number) => void—

See also

cock. Yes, it stands for core component kit. We checked twice.