Placement
npx npix@latest add Toast<>
<Button
onClick={() =>
toast({
title: "Form submitted!",
placement,
icon: <CheckCircleIcon fill="#76c12b" className="w-6 h-6" />,
})
}
>
Try me
</Button>
</>title
React.ReactNode
Title
icon
React.ReactNode
Icon to show next to title
placement
"top-left" | "top-right" | "bottom-left" | "bottom-right"
Placement of toast. By default is top-right
children
React.ReactNode
Body content for the toast
| Field | Description | Type |
|---|---|---|
| title | Title | React.ReactNode |
| icon | Icon to show next to title | React.ReactNode |
| placement | Placement of toast. By default is top-right | "top-left" | "top-right" | "bottom-left" | "bottom-right" |
| children | Body content for the toast | React.ReactNode |