Balance scale
A balance for comparing two amounts: costs and benefits, budget and actual, before and after. The beam tilts toward the heavier side and settles with a small overshoot while the pans hang level the whole way.
When to use
- Pros and cons, build versus buy, plan versus actual.
- A verdict that should be felt before it is read.
When not to use
- More than two sides; use a chart.
- Values that are not comparable in one unit.
Installation
pnpm dlx shadcn@latest add @caliper/balance-scale
Adds the file 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
BalanceScale
4 props
Also accepts the native props of its root element and a ref.
tiltFor
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 img semantics, with aria-hidden and aria-label 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-scale.mdThe index of every part is at /llms.txt.