SonnerTypes() — ui Function Reference
Architecture documentation for the SonnerTypes() function in sonner-types.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 9772a0f4_c2d5_1bd2_1fff_be64442892af["SonnerTypes()"] 6c10a096_4402_fdee_e01a_9ef5ea65db4f["sonner-types.tsx"] 9772a0f4_c2d5_1bd2_1fff_be64442892af -->|defined in| 6c10a096_4402_fdee_e01a_9ef5ea65db4f style 9772a0f4_c2d5_1bd2_1fff_be64442892af fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/new-york-v4/examples/sonner-types.tsx lines 7–61
export default 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
Source
Frequently Asked Questions
What does SonnerTypes() do?
SonnerTypes() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/examples/sonner-types.tsx.
Where is SonnerTypes() defined?
SonnerTypes() is defined in apps/v4/registry/new-york-v4/examples/sonner-types.tsx at line 7.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free