Skip to content
SENVENLI UI

Button group

Groups related buttons into one control, or joins a main action with its options as a split button.
import { ButtonGroup } from "@senvenli/react/action";

Examples

Split button

A main action with a second button for its alternatives.

Icon buttons

Each button keeps its own accessible name; the group has one too.

Guidelines

When to use it

  • Two to four related actions belong together.
  • A main action has a menu of variants (split).

Use something else when

  • The buttons hold a pressed state, such as a view or format choice. Toggle button
  • A longer row of controls above a list or editor. Toolbar

Accessibility

Built in

  • Exposed as a group.

You provide

  • An aria-label that names the group.

API reference

ButtonGroup

variant
"default" | "split"Default "default"

split: a primary main action with an icon button that opens a menu of alternatives; the seam uses the pressed brand fill instead of ds-border.

Also takes 275 standard DOM and ARIA attributes (id, aria-label, event handlers…).