Skip to content
Signal

Components

Chip

Small labels: route type, change type, metadata. Variants: --muted, --accent, --solid, --outline, --good, --warn, --alert.

Live example

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

Train.ct-chip
Bus.ct-chip--muted
feat.ct-chip--accent
release.ct-chip--solid
app.ct-chip--outline
perffixbreaking.ct-chip--good · --warn · --alert

Code

<span class="ct-chip">Train</span>
<span class="ct-chip ct-chip--muted">Bus</span>
<span class="ct-chip ct-chip--accent">feat</span>
<span class="ct-chip ct-chip--solid">release</span>
<span class="ct-chip ct-chip--outline">app</span>
<span class="ct-chip ct-chip--good">perf</span><span class="ct-chip ct-chip--warn">fix</span><span class="ct-chip ct-chip--alert">breaking</span>

Tokens

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

Custom propertyValueAlias
--ct-chip-backgroundvar(--card-2){colors.card2}
--ct-chip-colorvar(--ink){colors.ink}
--ct-chip-font-size12px
--ct-chip-font-weightvar(--weight-semibold){weight.semibold}
--ct-chip-height22px
--ct-chip-outline-widthvar(--size-focus-ring-width){size.focusRingWidth}
--ct-chip-padding-xvar(--space-8){space.s8}
--ct-chip-radiusvar(--radius-chip){radius.chip}

Usage

Do

  • Use chips for small metadata labels: route type, change type.
  • Pick a variant for emphasis: --muted, --accent, --solid, --outline.

Don't

  • Don't use a status variant (--good, --warn, --alert) without a status word.
  • Don't use line colours on chips; line colour means a line.

Accessibility

  • Chips are static text. Interactive filters use the route toggle or segmented control.