Componentsv2.189.0
Iconsv1.19.0
MCPv0.8.61
Tokensv0.34.3

The ButtonGroup component renders a group of related buttons next to each other.

Importing

You can import the component via:

import { ButtonGroup } from '@customerio/pluma-components/react';

Usage

To use the component, wrap a group of Button components with the ButtonGroup:

Loading editor

Props

ButtonGroup accepts a subset of Button props, which will then be passed down to the Button components (via context):

  • variant
  • size
  • isDisabled
Loading editor
Loading editor
Loading editor

Spaced groups

ButtonGroup accepts a groupVariant prop, which can be set to spaced to render a group of buttons separated by a gap. This is to ensure consistent gaps between buttons throughout the UIs.

Loading editor
Loading editor

API

Default:segmented

Whether the buttons should be rendered as a connected group (segmented) or equally spaced apart (spaced).

Disables all buttons in the group.

Default:md

The size of the buttons. medium and small are deprecated, use md and sm instead.

Change the color of the icon. By default, the icon inherits the button's text color. Use with care, as it can cause inconsistencies in the UI.

Overrides the icon size used within the button. Should only be used deliberately, as it can cause inconsistencies in the UI. For example, this is used in Pagination to increase the icon size.

Default:secondary

The variants of buttons to render.

On this page