Skip to content

Button Group

The ButtonGroup component allows you to group multiple buttons together, either horizontally or vertically. It is useful for organizing related actions. The button data is passed via the buttonsProps prop, which should contain an array of props for each individual button.

For a group of icon-only buttons, see the icon-only Button Group.

Playground

Installation

import { ButtonGroup } from '@harnessio/ui/components'
return (
<ButtonGroup
buttonsProps={[
{ children: 'Button', onClick: () => { console.log('Button 1') } },
{ children: 'Button', onClick: () => { console.log('Button 2') } },
{ children: 'Button', onClick: () => { console.log('Button 3') } }
]}
/>
)