Skip to content

Signal

Components

Status

A status word first, color second (Due, Delayed, alerts). --pill adds a tinted background.

Live example

Rendered with the real classes from /site/chitransit.css, light (left) and dark (right).

Due Delayed Scheduled.ct-status--good · --warn · --muted
OKErrorAlert.ct-status--pill

Code

<span class="ct-status ct-status--good">Due</span> <span class="ct-status ct-status--warn">Delayed</span> <span class="ct-status ct-status--muted">Scheduled</span>
<span class="ct-status ct-status--pill ct-status--good">OK</span><span class="ct-status ct-status--pill ct-status--warn">Error</span><span class="ct-status ct-status--pill ct-status--alert">Alert</span>

Tokens

From tokens/components.tokens.json. Override one instance by setting the property without the ct- prefix.

Custom propertyValueAliasResolves to
--ct-status-font-weightvar(--weight-bold){weight.bold}700
--ct-status-pill-font-sizevar(--fs-cap){type.cap}12
--ct-status-pill-heightvar(--size-chip-height){size.chipHeight}22 pt
--ct-status-pill-padding-xvar(--space-8){space.s8}8 pt
--ct-status-pill-radiusvar(--radius-pill){radius.pill}999 pt
--ct-status-pill-tint.1

Variants

--good (Due, OK), --warn (Delayed, errors), --alert and --muted; --pill adds a tinted background to any of them. Nothing else exists. The word carries the meaning; never a color alone.

<!-- Do -->
<span class="ct-status ct-status--warn ct-status--pill">Delayed</span>
<!-- Don't: color with no word, or the Alert glyph color on text -->
<span class="ct-status" style="color:var(--alert)">●</span>

Usage

Do

  • Lead with the word: Due, Delayed, an alert. Color reinforces it.
  • Use --pill for a tinted background in dense rows.

Don't

  • Don't use color alone for status, and never a line color.

Accessibility

  • The status word is the accessible text; the dot is decorative.