Toast

Notices in a corner, shown with toast.add from anywhere.

Installation

Examples

Default

Mount one Toaster, such as in the root layout, and toast.add shows a Notice in its corner from any file. Toasts close on their own, or swipe away.

demo.tsx

With an action

actionProps adds a button under the message, such as an undo.

action.tsx

States

type: "success" or "warning" colors it with the theme's state, and priority: "high" makes it an alert: red, and read out at once.

states.tsx

Anatomy

Each part's data-slot, which a theme styles, is beside it.