ToggleGroupItem() — ui Function Reference
Architecture documentation for the ToggleGroupItem() function in toggle-group.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 45bdfe75_6a5a_b0a7_64ae_d4e2d720d37d["ToggleGroupItem()"] c5e624b5_7590_b74f_e8d0_05042ff9a715["toggle-group.tsx"] 45bdfe75_6a5a_b0a7_64ae_d4e2d720d37d -->|defined in| c5e624b5_7590_b74f_e8d0_05042ff9a715 style 45bdfe75_6a5a_b0a7_64ae_d4e2d720d37d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/new-york-v4/ui/toggle-group.tsx lines 51–81
function ToggleGroupItem({
className,
children,
variant,
size,
...props
}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
VariantProps<typeof toggleVariants>) {
const context = React.useContext(ToggleGroupContext)
return (
<ToggleGroupPrimitive.Item
data-slot="toggle-group-item"
data-variant={context.variant || variant}
data-size={context.size || size}
data-spacing={context.spacing}
className={cn(
toggleVariants({
variant: context.variant || variant,
size: context.size || size,
}),
"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",
"data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
className
)}
{...props}
>
{children}
</ToggleGroupPrimitive.Item>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ToggleGroupItem() do?
ToggleGroupItem() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/ui/toggle-group.tsx.
Where is ToggleGroupItem() defined?
ToggleGroupItem() is defined in apps/v4/registry/new-york-v4/ui/toggle-group.tsx at line 51.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free