DEVELOPMENT PREVIEWIn development

Toast

Built-in, zero-dependency notifications. Imperative API, promise tracking, pause-on-hover, and screen-reader announcements out of the box.

Variants

Snippet
import { toast } from '@creo-team/buzz-ui/client'

toast('Plain message')
toast.success('Successfully saved!')
toast.error('Something went wrong')
toast('Profile updated', { description: 'Your changes are visible to everyone.' })

Promise tracking

One call renders loading → success/error as the promise settles.

Snippet
toast.promise(save(), {
	loading: 'Saving…',
	success: value => `Saved ${value}`,
	error: 'Could not save',
})

Actions & persistence

Snippet
toast('Message archived', {
	action: { label: 'Undo', onClick: restore },
})

toast.warning('Persistent until dismissed', { duration: Infinity })
toast.dismiss()        // dismiss everything
toast.dismiss(id)      // dismiss one

Setup

Mount a single <Toaster /> near the app root (this site does it in the layout). Position it per app; individual toasts may override.

Snippet
import { Toaster } from '@creo-team/buzz-ui/client'

export default function RootLayout({ children }) {
	return (
		<>
			{children}
			<Toaster position="bottom-right" />
		</>
	)
}

Updating in place

Snippet
const id = toast.loading('Uploading…')
// later — same id replaces the toast in place
toast.success('Uploaded', { id })