fndn/ui

Components

Toast

Beta

A brief message that appears in a corner and leaves by itself.

Details

A brief message that arrives in a corner and leaves by itself: "Link copied", "Deploying…", "Deploy failed" with Retry. <Toast /> is the region (mount it once, near the root of the app); toast({ title, … }) raises one from anywhere. Each toast is a raised card (the selection toolbar's floating surface: surface, shadow.overlay) with the tone's icon (the alert's, in the status-pill tones), a title, a description, an optional action Button and a close Button. Hovering or focusing the region pauses every timer. Behaviour, timing, stacking and announcements come from the Zag toast machine through Ark UI.

Behaviour from Ark UI, the toast machine of Zag.