Skip to content
caliper ui docs
DemoGet Pro

Balance meter

A reading that should sit at the centre, such as a tilt, a balance or a drift. A bubble rides a hairline scale and springs to the reading; inside the shaded tolerance band it turns green and reads Level.

Free

When to use

  • Alignment, calibration and device-orientation screens.
  • Any value with a natural centre, such as a budget against plan or a stereo balance.

When not to use

  • Readings that need precision; the written reading carries it.
  • Values with no natural centre; use `Meter`.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/balance-meter

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

BalanceMeter

5 props

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

PropTypeDefaultDescription
value *number—How far off centre: negative leans left, positive leans right.
maxnumber10The reading at either end of the scale.
tolerancenumber0.5How far off centre still counts as balanced.
labelstring"Level"Names the meter for assistive technology.
format((value: number) => string)degreesWrites a reading; defaults to degrees with a side, such as "6.4° right".

Keyboard

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

Accessibility

It exposes meter 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/balance-meter.md

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

More in Changing values