Toast
Stacked notifications with smooth directional motion, actions and loading states.
Stacked notifications
Click again to add another toast. Hover over the stack to expand it and pause dismissal.
Types
Position
Async operation
The same notification changes from loading to success when the operation completes.
Installation
Install the shared package once in your Exact app. This version is a beta.
bun add --exact @rightui/ui@0.4.0-beta.4
The Exact compiler requires Bun 1.4.2, regardless of which package manager installs the package.
Complete the font, app metadata and root provider setup (required for both installation methods).
Import
use Toast, ToastViewport, ToastMessage from "@rightui/ui"
Usage
Keep ToastViewport mounted and pass ToastMessage records newest first. Choose top-left, top-center, top-right, bottom-left, bottom-center or bottom-right. Supply a gated root clock for automatic dismissal and asynchronous updates; remove a message in dismiss(id) after its exit completes. Loading messages remain until updated or dismissed. Toast keeps its original single-notification API.
Keyboard
Tab reaches the front notification actions. Focus or hover expands the stack and pauses automatic dismissal. Escape closes the focused notification.
API Reference
Properties from the component source. State lives in your component; actions receive the updated value.
ToastViewport.id
string
ToastViewport.items
ToastMessage[]
ToastViewport.position
string
ToastViewport.clock
number
ToastViewport.reduced
bool
ToastViewport.maxVisible
number
ToastViewport.expandOnHover
bool
ToastViewport.requestClock
action
ToastViewport.dismiss
action
ToastViewport.act
action
Toast.id
string
Toast.title
string
Toast.description
string
Toast.actionLabel
string
Toast.destructive
bool
Toast.dismiss
action
Toast.act
action