Skip to content
caliper ui pro docs

Liquid gauge

A round gauge filled to its value with liquid: two waves roll across the surface, a few bubbles rise, and a new value pours in or drains with a small settle. The reading turns to the liquid's text colour exactly where the liquid covers it.

Pro

68 of 100 GB used

When to use

  • Storage, quotas, tanks, batteries, budgets: anything that fills.
  • One headline figure on a settings or billing page.

When not to use

  • Rows of many gauges; use usage meters.
  • Values without a natural full, such as revenue.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/liquid-gauge

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

LiquidGauge

5 props

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

PropTypeDefaultDescription
value *number—
maxnumber100
label *string—What is being measured, e.g. "Storage used".
sizenumber168Diameter in px.
format((value: number, max: number) => string)(v, m) => `${Math.round((v / m) * 100)}%`The reading in the middle; a whole percentage by default.

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/liquid-gauge.md

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

More in Changing values