Meter grid
Meter groups stacked over the same columns: a window per row, an account per column, one column read at a time.
import { MeterGrid } from "@arcadia/ui"Rows of MeterGroups over the same columns, in one grid of a label column, the strips and an end column, so a column reads down every row: a window per row, an account per column. A column a row lacks keeps a blank slot (state="none"), so nothing shifts. Past five columns every strip goes dense together.
One column is read at a time, in every row at once: active, and onActiveChange when the pointer comes to a column in any row. The gaps between columns and rows keep the last one, so a readout never blinks between two; leaving the grid clears it. Swap the head and the row ends for the active column's values to turn the grid into one account's readout.
Examples
Pointing at a column
The other columns dim, the head names the account and each row ends in its value there: a spent window in red, this chat's account led by its dot.
Fifteen accounts
Fifteen columns of about 10px still read as a picture: the open block, then the spent, then the one to sign in again.
rootStyle takes layout and these knobs.
--meter-grid-row-h- Ref<Space>Default var(--space-6)
- A row's height: its segments' hit area.
--meter-grid-end-w- Ref<Space> | DerivedDefault calc(var(--space-16) * 1.25)
- The end column's floor, so a longer end never moves the strips.
The grid is a group named by label. Its strips are one tab stop: Left and Right move along the columns, Home and End go to the ends, and Escape lets go. Each column is spoken by columnLabel(id), so say the whole account there: its name, whether it is open, and when it comes back. The strips themselves are decorative, and the row labels and ends are plain text beside them.
MeterGrid
rowsrequired- readonly MeterGridRow[]
active- string | null
- The column being read, in every row at once.
onActiveChange- (id: string | null) => void
- The pointer or the arrows came to a column, or left (
null). labelrequired- string
- The grid's accessible name ("Claude usage").
columnLabel- (id: string) => stringDefault (id) => id
- A column's spoken name. Default: its id.
size- "sm" | "md"Default "md"
rootStyle- RootStyle<MeterGridKnobs>
- Typed StyleX override: layout and the
--meter-grid-*knobs.