Docs / Primitives / Group
Group
Joins related controls into one unit: adjacent items share edges, and separators or static
text can sit between them. Dark mode is controlled by the parent through isDark;
the toggle below lives outside the component.
Horizontal with separators
Last action: none
Vertical
With text
$
USD
Nested groups
Differences from upstream
- Exported as
Group,GroupText,GroupSeparatorand the upstream aliasesButtonGroup,ButtonGroupText,ButtonGroupSeparator.classNameandclassare both accepted. childrenis a Svelte snippet instead of a React node.GroupTexthas norenderprop (Base UIuseRenderis React-only); it always renders adiv.GroupSeparatorrenders its own separator element instead of wrapping the shadcnSeparator.- The dark-mode hover and pressed separator tints and the focus-ring separator shifts from upstream's class list are not ported; edge joining and orientation are.
- Accepts
isDarkandonIsDarkChange; it reflectsisDarkand never callsonIsDarkChange.