Toast

Notification toasts for feedback messages.

Default

ToastProvider Props

PropTypeDefaultDescription
childrenReactNodeApp content.
position"top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center""bottom-right"Toast position.

toast() Options

PropTypeDefaultDescription
titlestringToast title.
descriptionstringAdditional message.
variant"default" | "success" | "danger" | "warning"Toast style.
durationnumber5000Auto-dismiss in ms (0 = persistent).

useToast Return Value

PropTypeDefaultDescription
toast(options) => voidShow a toast notification.
dismiss(id: string) => voidDismiss a toast by ID.