Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Group for Astro

Joined Astro buttons and controls with shared border and radius styles.

100%

Installation

bunx --bun shadcn@latest add @gnostic/group

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.