How full the working memory is, and what is taking up the room.
"Room left" is a segment in the legend, not an absence. A meter that only shows what is used makes the reader do the subtraction, and running out of context is the thing they are trying to avoid.
The accessible name carries the percentage in words, so the state is available without reading the bar.
import { MemoryMeter } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
total |
number |
The whole window. Segments are shares of this. |
segments |
MemorySegment[] |
|
label |
React.ReactNode |
|
leftLabel |
React.ReactNode |
|
format |
(v: number) => string |
Defaults to a percentage. Pass a formatter to show tokens or words instead. |
className |
string |