1 viewer
Back to Components
Component · Feedback

Toast

Transient notification with optional auto-dismiss and close affordance.

Category
Feedback
Slots
5
States
7
Writer
Shared
cre8.primitive.toast

Preview

Live renderShared SSR + WASM writers
Atomic Sync Completed
32KB crystal package synced across 8 peers in 18ms.
<Toast
  body="32KB crystal package synced across 8 peers in 18ms."
  dismissible={true}
  intent="success"
  title="Atomic Sync Completed"
/>

Anatomy

The named parts of the rendered markup. Recipes style these hooks, and every renderer keeps them stable.

SlotDOM class
root.primitive-toast
icon.primitive-toast__icon
title.primitive-toast__title
body.primitive-toast__body
close.primitive-toast__close
5 rows
Modifier
primitive-toast--{intent}
State attribute
data-intentfrom the intent prop
Role
status
Role by state
error → alert
Hydration markers
data-cre8-toast, data-cre8-toast-dismiss

States and platforms

The states the contract publishes, the platforms it declares, and the style recipes that dress it.

States
infosuccesswarningerrorenteringvisibleleaving
Platforms
webruntime-node
Recipes
unstyledruntime-console

Renderers

Shared writer
Toast renders through the one writer the server and the WASM DOM share, so both emit the same markup.

Every tag in the example above renders through a shared writer.

Declared adapters. A status is the manifest's declaration, not a measured parity result.

TargetRendererStatus
webreactexperimental
runtime-nodeview-nodeready
ssrhtml-semanticready
terminalterminal-textplanned
4 rows

Accessibility

Notifications announce politely by default, assertively for errors, and stay hidden from assistive tech until they have content.

  • Each toast exposes status or alert semantics with an appropriate live region.
  • Dismissible toasts expose a labelled close button.
  • Empty toast shells stay out of the accessibility tree until a title or body is present.