Skip to content
Signal

Components

Toast

Transient confirmation on the live surface. Add .is-visible (or data-visible) to show it.

Live example

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

Saved to Favorites
.ct-toast.is-visible

Code

<div class="ct-demo-toast"><div class="ct-toast is-visible" role="status">Saved to Favorites</div></div>

Tokens

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

Custom propertyValueAlias
--ct-toast-backgroundvar(--live-bg){colors.liveBg}
--ct-toast-colorvar(--live-ink){colors.liveInk}
--ct-toast-durationvar(--motion-live-section-duration){motion.liveSectionDuration}
--ct-toast-font-sizevar(--fs-sub){type.sub}
--ct-toast-font-weightvar(--weight-semibold){weight.semibold}
--ct-toast-offsetvar(--space-24){space.s24}
--ct-toast-padding-xvar(--space-16){space.s16}
--ct-toast-padding-yvar(--space-10){space.s10}
--ct-toast-radiusvar(--radius-pill){radius.pill}

Usage

Do

  • Use a toast for a short confirmation on the live surface: “Saved to Favorites”.

Don't

  • Don't put actions or long text in a toast; it disappears.

Accessibility

  • Give it role="status" so the message is announced without moving focus.