Skip to content
Actions Core Stable

ButtonGroup

.md

Joins a row of adjacent actions into one seamless control — one border, one divider, no doubled edges

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { ButtonGroup } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { Button } from "fancy-ui-svelte";
	import { ButtonGroup } from "fancy-ui-svelte";
</script>

<ButtonGroup label="Clipboard actions">
	<Button variant="outline">Cut</Button>
	<Button variant="outline">Copy</Button>
	<Button variant="outline">Paste</Button>
</ButtonGroup>

Examples

Basic Usage

Segmented Control

A Day / Week / Month picker; the active item is the demo's own state, not ButtonGroup's.

Split Button

A wide primary action and a narrow trailing trigger, joined by the same seam.

Vertical

orientation="vertical" stacks the items and rotates the divider onto the same axis.

Props

PropTypeDefaultDescription
orientation "horizontal" | "vertical""horizontal"Stacking axis for the joined items
label string-Accessible name for the group, exposed as aria-label
class string-Additional CSS classes
ref HTMLDivElement | nullnullBindable reference to the root <div>

Slots

SlotDescription
children The adjacent actions to join