SonnerTypes() — ui Function Reference
Architecture documentation for the SonnerTypes() function in sonner-types.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD cabf0870_76d1_a526_c35f_2ebbf7481f00["SonnerTypes()"] 6715b491_e01e_82e0_6854_f0278c0cfaac["sonner-types.tsx"] cabf0870_76d1_a526_c35f_2ebbf7481f00 -->|defined in| 6715b491_e01e_82e0_6854_f0278c0cfaac style cabf0870_76d1_a526_c35f_2ebbf7481f00 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/sonner-types.tsx lines 6–60
export function SonnerTypes() {
return (
<div className="flex flex-wrap gap-2">
<Button variant="outline" onClick={() => toast("Event has been created")}>
Default
</Button>
<Button
variant="outline"
onClick={() => toast.success("Event has been created")}
>
Success
</Button>
<Button
variant="outline"
onClick={() =>
toast.info("Be at the area 10 minutes before the event time")
}
>
Info
</Button>
<Button
variant="outline"
onClick={() =>
toast.warning("Event start time cannot be earlier than 8am")
}
>
Warning
</Button>
<Button
variant="outline"
onClick={() => toast.error("Event has not been created")}
>
Error
</Button>
<Button
variant="outline"
onClick={() => {
toast.promise<{ name: string }>(
() =>
new Promise((resolve) =>
setTimeout(() => resolve({ name: "Event" }), 2000)
),
{
loading: "Loading...",
success: (data) => `${data.name} has been created`,
error: "Error",
}
)
}}
>
Promise
</Button>
</div>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does SonnerTypes() do?
SonnerTypes() is a function in the ui codebase, defined in apps/v4/examples/base/sonner-types.tsx.
Where is SonnerTypes() defined?
SonnerTypes() is defined in apps/v4/examples/base/sonner-types.tsx at line 6.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free