Status strip

Shows the few numbers to check first, in one ruled row.

Styles

  • Workers48/ 64
    Queue depth1,204
    Last load14:02:51

    frameddefault

  • ingest-prod
    Workers48/ 64
    Queue depth1,204
    Last load14:02:51

    plain

States

  • rest

  • hover

  • focus-visible

  • selected

Usage

When to use it
Use
The top or foot of a pipeline, cluster or warehouse page: the two to six numbers a person checks before reading anything else.
Use
A row of counts that filter the list under it (failed, running, queued), one of them chosen.
Not for
One big headline number with a caption. Use Meter.
Not for
Many label and value pairs about one thing. Use Data list.
Not for
Picking one of a few views of the same data. Use Segmented control.

Rules

7 rules
Must
Keep a strip to two to six cells. Because past six, the cells wrap into rows on a laptop and the strip turns into a table nobody scans.
Must
Select at most one cell, and only when it filters or locates the view under it. Because the yellow wash means "you are here", and two of them leave the person asking which one the list follows.
Must
Render a cell that filters as a button with render={<button type="button"/>}. Because a div with onClick takes no focus and is not announced as a control.
Never
Set a value in capitals or in a label role; values go in StatusStripValue as written. Because values are compared and copied, and capitals change what eu-west-2 or 90ms say.
Must
Show an outcome in a cell with a StatusMark beside a value that names it, never a coloured number alone. Because a red 3 reads as a red 3; the mark and the label say it is three failures.
Never
Use the framed variant as a row inside a frame; use variant="plain" there. Because its own edge doubles the frame's rule, and a box inside a frame is the one thing Sodium never draws.
Should
Write labels as one or two nouns and keep the unit out of them; put it in StatusStripUnit.

State order

4 states, highest first
1
focus-visible
2
selected
3
hover
4
rest

Accessibility

4 checks
The strip is a named group; each cell reads its label then its value.
Labels are text-3, 5.6:1 on the page and 5.1:1 on the wash; values text-1, 18.3:1, and 16.5:1 on the wash.
The selected cell sets aria-current="true"; the wash is never the only cue in forced colours, which draw an outline.
A filtering cell is a real button with the 2px focus ring drawn inside its rules.

Keyboard

2 keys
Tab
Moves between filtering cells.
Enter
Chooses the focused cell.

Edge cases

4 edge cases
Narrow screen
Cells wrap into rows, each at least 160px; the rules still meet with no doubled edge.
Long value
Ends in an ellipsis inside its cell; give the full value a title or a tooltip.
Missing value
Write a dash and say why in the label's tooltip; never leave the cell blank.
Dark theme
The selected cell is the dark yellow tint under text-1, 11.7:1.

API

6 props
variant
'framed' | 'plain' default 'framed'
label
string
StatusStripCell selected
boolean default false
StatusStripCell render
ReactElement
StatusStripValue
span
StatusStripUnit
span

Tokens

13 tokens
--line
#e2dfd5
--page
#ffffff
--selected
#fff4bf
--selected-strong
#ffec99
--hover
rgb(22 21 18 / 0.04)
--pressed
rgb(22 21 18 / 0.08)
--text-1
#161512
--text-2
#55524a
--text-3
#6b675e
--label-col
160px
--type-label-sm
400 12px/16px var(--font-mono)
--type-code
400 13px/20px var(--font-mono)
--focus
#7a5d00

Install

For your coding agent

GitHub

Please star me pookie

198

A new design system every week

Leave your email before you copy the prompt.