Group

A layout component for grouping related elements together, with options for attached styling (seamless borders) and equal-width distribution.

Anatomy

<script>
  import { Group } from "@saas-ui/svelte/layout/group";
  import { Button } from "@saas-ui/svelte/components/button";
</script>

<!-- Spaced group -->
<Group>
  <Button>One</Button>
  <Button>Two</Button>
</Group>

<!-- Attached group -->
<Group attached>
  <Button>One</Button>
  <Button>Two</Button>
</Group>

Examples

Attached Accessibility

Use attached prop to join elements seamlessly with connected borders, ideal for segmented controls.

Basic Accessibility

Basic group with default gap between items arranged horizontally.

Grow Accessibility

Use grow prop to make all items expand equally to fill the available container width.

With Buttons Accessibility

Common use case showing buttons grouped together with consistent spacing.

Props

Prop Type Default Description
attached boolean false If `true`, the elements will be attached together.
grow boolean false If `true`, the elements will grow to fill the available space.
orientation vertical | horizontal horizontal The orientation of the group.
class text - Additional CSS classes to apply.
children any - The content to be rendered inside the component.