Toast
A short message about something that just happened, in the corner of the screen. Each one stays open in a column, or they stack in a deck that spreads on hover.
npx shadcn add https://kinoui.com/r/toast.jsonCopy install command
Examples
Default
Each toast stays open in a column in the corner, and a new one pushes the others up. In an app, ToastProvider and one Toaster go around it once, in the root layout.
Deck
With variant="deck" they stack behind the newest one, and hover or focus spreads them into a list.
Promise
One toast shows the work while it runs and turns into its result in place.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/toast.json- Files
components/kino/spinner.tsxlib/refs.tslib/reduce-motion.tslib/resize.tslib/swap.tsxlib/notice.tsxcomponents/kino/button.tsxcomponents/kino/toast.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
ToastProvider
ToastViewport
CSS variables
Accessibility
- Every toast is announced when it arrives. One with
priority: "high"is announced at once, for something urgent. - F6 moves focus to the toasts, Tab moves between them, and Escape closes the one in focus. Their timers stop while the pointer or focus is on them.
- A toast that needs an answer, such as a failed deploy, should stay (
timeout: 0) and say what to do next. - When the system asks for less motion, toasts fade in and out where they are.