Skip to main content
Version: Next

Meter API

import { Meter } from '@editora/ui-react';

Props​

PropTypeDescription
format'percent' | 'value' | 'fraction'
highnumber | string
labelstring
lownumber | string
maxnumber | string
minnumber | string
mode'line' | 'circle'
onValueChange(detail: { value: number; min: number; max: number; low: number; high: number; optimum: number | null; percent: number; state: 'low' | 'optimum' | 'suboptimum' | 'high'; }) => void
optimumnumber | string
precisionnumber
shape'round' | 'pill' | 'square'
showLabelboolean
size'xs' | 'sm' | 'md' | 'lg'
tone'auto' | 'brand' | 'success' | 'warning' | 'danger' | 'neutral'
valuenumber | string
variant'default' | 'soft' | 'solid' | 'contrast'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-meter>​

Meter renders the ui-meter custom element from @editora/ui-core, which can also be used without React.

Attributes: format, high, label, low, max, min, mode, optimum, precision, shape, show-label, size, tone, value, variant

Events: change