new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

shadcn/ui · Components · all subjects

toast/usage

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Toast import for usage

To use the toast component, import it with: import { toast } from '@/components/ui/toast'

Basic toast notification

Create a basic toast notification by calling toast.add() with title and description options. Example: toast.add({ title: 'Event created', description: 'Sunday, December 3 at 9:00 AM' })

Toast action button

To render an action button in a toast, pass button props using the actionProps option. Example: const id = toast.add({ title: 'Event created', actionProps: { children: 'Undo', onClick() { toast.close(id) } } })

Toast promise pattern

Use toast.promise() to display a single toast that updates as an asynchronous task progresses through loading, success, and error states.

Give your agent this brain