Group for Astro
Joined Astro buttons and controls with shared border and radius styles.
Installation
bunx --bun shadcn@latest add @gnostic/groupnpx shadcn@latest add @gnostic/grouppnpm dlx shadcn@latest add @gnostic/groupCopy the files
src/components/ui/group/group-text.astrosrc/components/ui/group/group.astrosrc/components/ui/group/index.tssrc/components/ui/group/group-separator.astrosrc/components/ui/group/group-variants.ts
Usage
import { Group } from "@/components/ui/group"
Use the Code tab above for the complete Astro composition.
API reference
Read the registry source for the exported parts and prop types.
When to use Group
Place related buttons directly inside Group. Set orientation="vertical" for a column. GroupText can add a label, and GroupSeparator creates an internal divider. A group should contain controls that operate on the same content.
Keyboard and behavior
Group uses role="group" and needs an accessible name when its purpose is not clear from nearby text. Each child keeps its own native keyboard behavior. This layout does not add arrow-key navigation or single-selection state.
Theme and layout
The outer children retain rounded corners while the inner edges join. Keep child sizes consistent. Check visible focus around the shared borders, especially when a child is disabled.