Components
Meter
A measurement within a known range, such as a quota, in cells or labelled parts.
Ombelle · light
Meter
Deploys this month128 / 200
Storage7 / 10 GB
BuildsAssetsLogs
Storage used
Installation
Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.
pnpm dlx @ombelle-ui/cli@1.1.2 add meterAdds components/ui/meter.tsx and installs react, clsx, tailwind-merge with lifecycle scripts disabled. This is a client component.
In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.
Usage
example.tsx
import { Meter, MeterLabel } from '@/components/ui/meter'
export function Example(){return <Meter value={128} max={200} segments={10} warningAt={0.6}><MeterLabel>Deploys this month</MeterLabel></Meter>}API and states
- API
- Meter (value, min, max, segments, warningAt, shape bar or circle), MeterLabel, MeterSegment (value, tone), MeterLegend, MeterLegendItem (tone)
- Minimum states
- Discrete, warning, labelled parts, clamped values
- Native basis
- role="meter" with value text; Base UI uses its Meter
- Styles
- Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.