Warmth

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/slider-warmth

About this component

A colour temperature slider for a lamp: light glows inside a frosted glass tube from candle orange to cool daylight, the thumb is a clear glass bead filled with exactly the colour under it, and it focuses a spot of that light onto the surface below.

Triggers

  • State change
  • Glow
  • Gradient

Techniques

  • CSS variables
  • Gradient
  • Radial gradient

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native range input (aria-label "Colour temperature") laid over the drawn track at zero opacity, so dragging, clicking, keys and screen readers all work as usual; the drawing is aria-hidden and :focus-visible outlines the thumb. aria-valuetext reads the kelvin value and its name.

Reduced motion

The transitions and loops stop and the component jumps straight to its final state.

Use it in anything you build, commercial and client work included. Licence

More sliders

See all
AcidGet code
ArcGet code
BearingGet code
BulbsGet code