Introducing PrimeReact v11-alpha 🎉Discover Now
styledButton

ButtonGroup

ButtonGroup composes related buttons into a connected pill with shared corners and seams.

preview

Usage#

import { Button } from '@primereact/ui/button';
import { ButtonGroup } from '@primereact/ui/buttongroup';
<ButtonGroup>
    <Button>Save</Button>
    <Button>Cancel</Button>
</ButtonGroup>

Examples#

Basic#

A standard ButtonGroup wraps multiple buttons into a connected unit.

basic-demo

Icons#

Buttons inside a group support leading and trailing icons.

icon-demo

Severity#

Each button in a group can use a different severity to convey intent.

severity-demo

Raised#

Raised buttons display a shadow to indicate elevation.

raised-demo

Rounded#

Rounded buttons soften the outer corners of the group.

rounded-demo

Text#

Text buttons render as textual elements while keeping the connected layout.

text-demo

Outlined#

Outlined buttons display a border without a transparent background.

outlined-demo

Icon Only#

Icon-only buttons can be combined into compact toolbars and pickers.

icon-only-demo

Sizes#

ButtonGroup supports small and large sizes alongside the default.

size-demo

Disabled#

When disabled is present on each button, the group becomes non-interactive.

disabled-demo

Split Button#

Pair a primary action with a Menu.Trigger button to expose related options without crowding the main action.

split-button-demo

API#

Sub-Components#

See Primitive API for ButtonRoot and ButtonGroup component documentation.

Hooks#

See Headless API for useButton hook documentation.

Accessibility#

See Button Primitive for WAI-ARIA compliance details and keyboard support.