Get GliaKit

Actions

Button group

Attached button clusters: split buttons, segmented controls and stacked avatar groups, composed from Button and Avatar.

Source
Composition pattern (Button + Avatar)
Figma
Button groups section · split (primary, outline), segmented, avatar group.

Usage

Included in the GliaKit boilerplate. Import it where you need it:

tsx
import { Button } from "@/components/ui/button";import { Avatar } from "@/components/ui/avatar";

When to use

  • Split button: a main action plus a menu of related actions.
  • Segmented control: switching between a few mutually exclusive views, like Day, Week and Month.
  • Avatar group: showing who is on a project or document without listing names.
  • For more than four or five options, use Tabs or a Select instead of a segmented control.

Examples

Segmented control

Mutually exclusive options. Try it: the active option is marked with aria-pressed.

Avatar group

Overlapping avatars with an overflow counter.

API reference

Pattern

No dedicated component: square the inner corners of adjacent Buttons and remove the shared border.

PropTypeDefaultDescription
rounded-r-none / rounded-l-noneclassName-Square the edges where buttons meet.
border-l-0className-Avoid a double border between outline buttons.
-ml-2 ring-2 ring-cardclassName-Overlap avatars and separate them with a ring in the surface color.

Accessibility

  • Give the menu half of a split button an aria-label such as "More actions".
  • For a segmented control that switches views, mark the active option with aria-pressed="true".
  • In an avatar group, give the overflow counter a label such as "9 more people" for screen readers.

Related