Meter API
import { Meter } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
format | 'percent' | 'value' | 'fraction' | |
high | number | string | |
label | string | |
low | number | string | |
max | number | string | |
min | number | 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 | |
optimum | number | string | |
precision | number | |
shape | 'round' | 'pill' | 'square' | |
showLabel | boolean | |
size | 'xs' | 'sm' | 'md' | 'lg' | |
tone | 'auto' | 'brand' | 'success' | 'warning' | 'danger' | 'neutral' | |
value | number | 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