Skip to Content
Liquid Glass UI
Components

ButtonGroup

Merges multiple buttons into a shared Apple 27 toolbar Liquid Glass capsule by default, or joins them into a pill-ended Bordered segmented row when glass={false}.

Fully compatible with the standard shadcn/ui JSX API (ButtonGroup / ButtonGroupText / ButtonGroupSeparator, supporting orientation):

  • Segmented pill joining: Outer buttons keep full pill radii horizontally while inner edges meet cleanly; vertically, outer buttons use 18px ↔ 12px radii.
  • Text prefix: ButtonGroupText renders a neutral Bordered capsule.
  • Shared glass capsule (default): Matches iOS 27 Toolbars / Buttons and macOS 27 toolbar groups—the entire group shares one Regular - Small Liquid Glass capsule with 4px (iOS) / 2px (macOS) inner inset matching single glass button height. Child buttons automatically switch to Over-Glass (best paired with variant="ghost"). The capsule automatically disables when placed on an existing glass surface.
apple-liquid-ui/preview/button-group-demo
MacBook · 16:10

Shared Glass Capsule

apple-liquid-ui/preview/button-group-glass
MacBook · 16:10
<ButtonGroup glass aria-label="Document actions">
  <Button size="icon" variant="ghost" aria-label="Share">
    <ShareIcon />
  </Button>
  <Button size="icon" variant="ghost" aria-label="Edit">
    <PencilIcon />
  </Button>
</ButtonGroup>

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/button-group

Usage

import { Button } from '@/components/ui/button';
import { ButtonGroup } from '@/components/ui/button-group';

export function Example() {
  return (
    <ButtonGroup glass={false}>
      <Button variant="secondary">Archive</Button>
      <Button variant="secondary">Share</Button>
    </ButtonGroup>
  );
}

Props

ButtonGroup

PropTypeDefaultDescription
orientation'horizontal' | 'vertical''horizontal'Layout direction
glassbooleantrueMerges into a single shared Liquid Glass toolbar capsule with Over-Glass child buttons; false joins buttons into a Bordered segmented row (child buttons inherit opaque rendering unless overridden). Automatically disabled on glass surfaces

On this page