Toggle() — ui Function Reference
Architecture documentation for the Toggle() function in toggle.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD de3ff34c_a6f8_4a4e_61b7_824204b3687e["Toggle()"] b2b1a1ea_d960_91d7_7db3_07be35c6490a["toggle.tsx"] de3ff34c_a6f8_4a4e_61b7_824204b3687e -->|defined in| b2b1a1ea_d960_91d7_7db3_07be35c6490a style de3ff34c_a6f8_4a4e_61b7_824204b3687e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/radix/ui/toggle.tsx lines 30–44
function Toggle({
className,
variant = "default",
size = "default",
...props
}: React.ComponentProps<typeof TogglePrimitive.Root> &
VariantProps<typeof toggleVariants>) {
return (
<TogglePrimitive.Root
data-slot="toggle"
className={cn(toggleVariants({ variant, size, className }))}
{...props}
/>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Toggle() do?
Toggle() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/ui/toggle.tsx.
Where is Toggle() defined?
Toggle() is defined in apps/v4/registry/bases/radix/ui/toggle.tsx at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free