components / 10

marked slider

the value is not filling a bar. it is stretching a live pen stroke beneath a draggable glyph.

shadcnnpx shadcn@latest add berkantay/cheez/marked-slider
live

playground

64%
humanity
64%
how imperfect should this feel
size
axis
character
filled stroke
thumb glyph
stroke ink
thumb ink
state
<MarkedSlider
  label="humanity"
  value={64}
  min={0}
  max={100}
  orientation="horizontal"
  indicatorMark="long-underline"
  thumbMark="sparkle"
  character="rushed"
  onValueChange={setValue}
/>
behavior

states

single, range, vertical, disabled
default
weight
35
wave
energy
72
range
window
25 – 75
step
scale
invalid
contrast
10
too low
disabled
locked
56
vertical
volume
60
large star
impact
80
composition

motion duration

180420 ms
duration window
180 – 420 ms
minimum and maximum timing for the drawing character
reference

api

one primitive, one or many thumbs
partproptypedefaultpurpose
Slidervaluenumber | number[]controlled value or range
SliderdefaultValuenumber | number[]0uncontrolled initial value
SlideronValueChangefunctioncontinuous value callback
SlideronValueCommittedfunctioncompleted interaction callback
Slidermin / maxnumber0 / 100allowed bounds
Sliderstepnumber1value granularity
Sliderorientation"horizontal" | "vertical""horizontal"axis and keyboard direction
SliderindicatorMarkCheezType"long-underline"horizontal filled stroke
SliderverticalIndicatorMarkCheezType"arrow-down"vertical filled stroke
SliderthumbMarkCheezType"sparkle"draggable glyph
SliderindicatorColorstring"#35d9ff"filled stroke ink
SliderthumbColorstring"#ff5fa2"thumb glyph ink
Slidercharacter"calm" | "rushed" | "chaotic""rushed"drawing personality
Slidersize"small" | "medium" | "large""medium"control scale
SlidershowValuebooleantrueformatted live output
SlidervalueSuffixstring""display suffix
SliderthumbLabelsstring[]range thumb names
Slidernamestringnative form field name
Sliderdisabledbooleanfalsedisabled state
SlidererrorReactNodeinvalid message and pink ink

behavior notes

  • Arrow keys move by one step
  • Page Up and Page Down use the large step
  • Home and End jump to the bounds
  • range thumbs receive distinct accessible names
  • hidden range inputs participate in forms
  • drag updates stretch existing SVG instead of rebuilding paths