AhaSlides Design
v0.52.0React · Vue · Lit

Components · Feedback

Toast

A brief, auto-dismissing confirmation of an action — rendered through antd's message API.

Examples

API

PropTypeDefaultNotes
typesuccess | info | warning | error | loadinginfoStatus glyph + tone
contentstringThe message text
durationnumber3Seconds on screen; 0 keeps it until dismissed
onClose() => voidFires after the toast leaves

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/toast-theme';   // registers <toast>

Agent feed for this component (absolute, fetchable anywhere): toast.agent.json · toast.md · toast.llms.txt

When to use

When to use
  • Toast — confirming a quick action succeeded (saved, copied, sent) with nothing to act on
  • Notification — a richer message with a title + description, or one the user may need later
  • Alert — a persistent, inline message tied to a region of the page
One line, past tense, no title. Never put an action inside a toast that disappears — if the user must respond, use a Notification or a Modal.
Surfaces
editor dashboard settings

Spec

Surface white elevated pill · radius 8 · ink #1A1A1A text · Position top-centre, floating · Duration 3s default (0 = sticky) · Status success / info / warning / error / loading