Contact Us

ButtonGroup

DOC-00112 reference implementor, developer

A flex wrapper for grouping multiple Button components. Provides consistent spacing, alignment, and layout direction.

File: src/core/components/primitives/ButtonGroup.astro

Props

PropTypeDefaultNotes
direction"row" | "column""row"Flex direction
align"start" | "center" | "end""start"Main-axis alignment (justify-content)
gap"sm" | "md" | "lg""md"Space between buttons
wrapbooleantrueWhether buttons wrap to new lines
classstringAdditional CSS classes

Usage

---
import ButtonGroup from "@core/components/primitives/ButtonGroup.astro";
import Button from "@core/components/primitives/Button.astro";
---

{/* Horizontal row (default) */}
<ButtonGroup>
  <Button variant="primary">Save</Button>
  <Button variant="outline">Cancel</Button>
</ButtonGroup>

{/* Vertical stack, centered */}
<ButtonGroup direction="column" align="center" gap="lg">
  <Button variant="primary" fullWidth>Sign Up</Button>
  <Button variant="secondary" fullWidth>Learn More</Button>
</ButtonGroup>

Accessibility

  • Renders with role="group" to convey the grouping relationship to assistive technologies.
  • No keyboard interaction of its own — child Button components handle their own keyboard behavior.
REQ-00043 implemented The theme shall include foundational UI primitives.
REQ-00272 implemented The theme shall provide layout and content components covering standard content block patterns (separator, button group, columns, media-text, pullquote, reading time, table, gallery, masonry gallery, cover, timeline).

Search

Search across pages and articles. Use arrow keys to navigate results.

Search across pages and articles.

Loading search...

Search is unavailable. Please try again later.

    No results for ""

    Try different keywords or fewer words.