A meter shows a value in a known range; for a task that moves, use a Progress. Set low, high, and optimum to color the levels.
storage-meter.tsx
Meter
<div>| Prop | Type | Default | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||||||||||
| low | number | — | The top of the low region, as on the native <meter>. Set it or high to get levels. | ||||||||||||||||||||||||||||||
| high | number | — | The bottom of the high region, as on the native <meter>. | ||||||||||||||||||||||||||||||
| optimum | number | — | The best value. Under low: low is good. Over high: high is good. Between: the middle. | ||||||||||||||||||||||||||||||
| glow | boolean | — | A soft halo in the fill color (glow, @gelatin-ui/glow). Default: false. | ||||||||||||||||||||||||||||||
From Base UIMeter.RootBase UI docs | |||||||||||||||||||||||||||||||||
| aria-valuetext | string | — | A string value that provides a user-friendly name for aria-valuenow, the current value of the meter. | ||||||||||||||||||||||||||||||
| format | NumberFormatOptions | — | Options to format the value. | ||||||||||||||||||||||||||||||
| get | — | A function that returns a string value that provides a human-readable text alternative for aria-valuenow, the current value of the meter. | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||||||||||||||
MeterLabel
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MeterValue
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
From Base UIMeter.ValueBase UI docs | |||
| children | — | ||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MeterTrack
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| thickness | "thick""thin" | "thick" | |
| rounded | "default""full" | — | |
| size | "default""lg""sm""xs" | — | |
| class | string | — | |
| variant | "bar""dots""segments""steps""ticks" | "bar" | bar (default): one fill. The others draw a row of segments. |
| segments | number | — | The segment count of a segmented look. Default: ticks 30, segments 10, steps 5, dots 20. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MeterIndicator
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| variant | "default""muted" | "default" | default: the ink fill (and the level colors). muted: a quiet gray fill (muted-foreground at 50%) with no level color, for the bars of a comparison where only the one that leads takes the ink: the results of a Poll before its winner. The color is never the only signal: the value text says which one leads. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |







