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-badgeState/LakeClosed
in a rowCode
<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 property | Value | Alias | Resolves to |
|---|---|---|---|
--ct-closed-badge-background | var(--inactive) | {colors.inactive} | #C9CDD6 #465267 |
--ct-closed-badge-color | var(--ink) | {colors.ink} | #101A2E #EEF1F6 |
--ct-closed-badge-font-size | var(--fs-cap) | {type.cap} | 12 |
--ct-closed-badge-font-weight | var(--weight-bold) | {weight.bold} | 700 |
--ct-closed-badge-height | var(--size-chip-height) | {size.chipHeight} | 22 pt |
--ct-closed-badge-padding-x | var(--space-8) | {space.s8} | 8 pt |
--ct-closed-badge-radius | var(--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.
Loading the contract…
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
closedortemporarily_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".