Skip to content

Meter

Display a scalar measurement within a known range. CSS only

Meter
Copy this markup
<div class="ui-meter-field">
<label for="quality">Release readiness</label>
<output for="quality">82 of 100</output>
<meter id="quality" min="0" max="100" value="82" low="40" high="80" optimum="100">82%</meter>
</div>

Install

Styles and registration
import '@timelessui/components/css/tokens.css'
import '@timelessui/components/css/meter.css'

Anatomy

Parts are authored in your own markup and identified by the selector below, so your CSS can target the same anatomy without loading Timeless styles. Required parts must be present for the component to work. Private data-ui-internal-* hooks are written by the runtime and must never be authored.

PartRequiredSelectorPurpose
hintNo[data-ui-part~='hint']Supporting text under the meter.

Styling

Root identity: ui-meter-field. Required stylesheets: tokens.css, meter.css.

This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.

Design tokens this component reads (10)

These are global Atmosphere tokens. Change them once at the theme level rather than per component.

--ui-bg-control · --ui-danger · --ui-fg · --ui-fg-muted · --ui-font-mono · --ui-radius-pill · --ui-shadow-inset · --ui-space-2 · --ui-success · --ui-warning

Accessibility

Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.

Before JavaScript runs

This primitive is CSS only. There is nothing to register and nothing to wait for.

More examples

Open Meter in StoryLite for variants, controls, and manual testing.