Pro
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.
pnpm dlx shadcn@latest add @caliper/thermostatWhen to use
Use it for
- Smart-home, HVAC and appliance controls.
- Any bounded value that is best set by turning.
Skip it when
- Ranges that are not bounded.
- Settings that need to be exact on touch; pair it with plus and minus buttons.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Snaps to a step while dragging
- The value moves in steps of half a degree, so the number never shows more precision than the control has.
Styling
- Colour by position
- The arc blends from cool to warm by where it ends, so the colour agrees with the number.
Usage
- A slider with the mode in its value
- Arrows move by a step, Page Up and Down by a degree, and the value text says heating, cooling or holding.
Installation
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.
Usage
Import it from your copy of the source. The example behind the preview comes with the source. It is built from Thermostat, angleFor and modeFor.
import { Thermostat, angleFor, modeFor } from "@/components/ui/thermostat"
The worked example comes with Pro
The 35-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
Thermostat
component
Also accepts the native props of its root element and a ref.
angleFor
component
No props of its own; it accepts the native props of its root element.
modeFor
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes slider semantics, with aria-label, aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext and aria-hidden kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Rotary knobA rotary control with a real edge. The knob is a short cylinder seen from above: a stack of discs gives it thickness, a ring of ticks lights up to the value, and the number is always written beside it. Drag it or use the keys; with detents on it clicks through every tenth.
- GaugeA dial for one value in a range, with named thresholds.
- Time dialA circular control for choosing a time.