toast/01-basic-toast
A simple toast notification. Click the button to trigger a toast message with default styling.
Loading interactive preview
import { Button } from 'ui-lab-components/button'
import { toast } from 'ui-lab-components/toast'
import { Toaster } from 'ui-lab-components/toast';
export default function Example() {
return (
<>
<Button
size="sm"
onClick={() =>
toast({
toasterId: 'basic-toast',
title: 'Notification',
description: 'This is a toast message',
})
}
>
Show Toast
</Button>
<Toaster toasterId="basic-toast" />
</>
)
}