Toast

Display temporary notifications, alerts, or messages to users with rothko ui's Toast component. Provide timely and unobtrusive feedback or information, ensuring a smooth and seamless user experience within your application.

Import

import { useToaster } from '@rothko-ui/react';

Usage

With Life
With Kind

primary

secondary

success

danger

warning

info

Hook Args

NameTypeDefaultDescription
Name
content
Type
ReactNode
Default
 
Description
The content of the toast
Name
duration
Type
number
Default
 
Description
The duration of the toast in milliseconds
Name
kind
Type
'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'
Default
 
Description
Semantic style of the toast
Name
label
Type
ReactNode
Default
 
Description
The label of the toast
Name
withLife
Type
boolean
Default
 
Description
Specifies whether the toast has a life cycle