Skip to content

Signal

Components

Closed badge

The word Closed on an Inactive pill, for a closed station or stop in lists, favourites, search and its page.

Live example

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

Closed.ct-closed-badge
State/LakeClosed
in a row

Code

<span class="ct-closed-badge">Closed</span>
<div class="ct-card ct-flex ct-gap-12 ct-items-center"><span class="ct-mode-badge ct-mode-badge--train" role="img" aria-label="Train"><svg aria-hidden="true"><use href="#i-train"/></svg></span><span>State/Lake</span><span class="ct-closed-badge">Closed</span></div>

Tokens

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

Custom propertyValueAliasResolves to
--ct-closed-badge-backgroundvar(--inactive){colors.inactive}#C9CDD6 #465267
--ct-closed-badge-colorvar(--ink){colors.ink}#101A2E #EEF1F6
--ct-closed-badge-font-sizevar(--fs-cap){type.cap}12
--ct-closed-badge-font-weightvar(--weight-bold){weight.bold}700
--ct-closed-badge-heightvar(--size-chip-height){size.chipHeight}22 pt
--ct-closed-badge-padding-xvar(--space-8){space.s8}8 pt
--ct-closed-badge-radiusvar(--radius-pill){radius.pill}999 pt

React Native

Use the shared component from @chitransit/signal/rn. API and live gallery.

Contract

Contract: components/closed-badge.yaml. States are drawn live by transit.js.

Variants

One form; no variants. .ct-closed-badge (React Native ClosedBadge) reads Closed for both closed and temporarily_closed; an open stop shows nothing. Nothing else exists.

<!-- Do -->
<span>State/Lake</span><span class="ct-closed-badge">Closed</span>
<!-- Don't: a delay or an alert in the closed pill; that is a status -->
<span class="ct-closed-badge">Delayed</span>

Usage

Do

  • Show it after the name of any station or stop whose status is closed or temporarily_closed.
  • Pair it with the closure note and the replacement stations on the page.

Don't

  • Don't show arrivals or "Can't update" next to it; a closed stop isn't polled.
  • Don't use it for a delay or a service alert; that is a status.

Accessibility

  • Ink on Inactive meets 4.5:1 in light and dark.
  • The word is the accessible text; inside a row, the row reads "State/Lake, closed".