Skip to content
caliper ui pro docs

Thermostat

A round thermostat. Drag around the dial or use the arrow keys to set the target; the arc fills from cool blue to warm amber as it rises, and a small tick marks the temperature the room is at.

Pro

When to use

  • Smart-home, HVAC and appliance controls.
  • Any bounded value that is best set by turning.

When not to use

  • Ranges that are not bounded.
  • Settings that need to be exact on touch; pair it with plus and minus buttons.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/thermostat

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

Thermostat

9 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
valuenumber—The target temperature.
defaultValuenumber21
onValueChange((value: number) => void)—
currentnumber19The temperature the room is at now.
minnumber10
maxnumber30
stepnumber0.5
unitstring"°"
labelstring"Temperature"

angleFor

0 props

No props of its own; it accepts the native props of its root element.

modeFor

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes slider semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/thermostat.md

The index of every part is at /llms.txt.

More in Changing values