Climate

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-climate

About this component

A thermostat with one ring of sixty ticks that you turn by dragging round it or with the arrow keys. The lit ticks ramp from cool blue through mint to amber, the glow takes the target's colour, and a small 3D mark at the foot says whether the room is holding (a soft leaf), heating (a glossy flame) or cooling (a frosted crystal).

Triggers

  • Card
  • Glow
  • Gradient
  • Spring
  • State change
  • Mouse tracking
  • Neumorphic
  • 3D
  • Icon swap

Techniques

  • @property
  • CSS variables
  • CSS transition
  • Event position
  • Radial gradient
  • Keyframes
  • Spring
  • SVG
  • SVG filter
  • Filter

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

The dial is role=slider with aria-valuemin, max, now and a spoken value; Arrow keys step 0.5, Page Up/Down step 2, Home and End jump to the ends. A visible focus ring in the target colour circles the dial. A polite live region says Heating, Cooling or Holding.

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

More cards

See all
FlapGet code
ForecastGet code
HomeGet code
MascotGet code