Button-Group

A group of buttons is used to wrap a series of buttons.

When to use it

  • To combine primary and secondary buttons.
  • To allow users to navigate between several separate tabs with options in a main screen.

Component anatomy

This is a complex component, which means that it may consist of other components:

Installation

npm i @synerise/ds-button-group

or

yarn add @synerise/ds-button-group

Usage

import ButtonGroup from '@synerise/ds-button-group'
<ButtonGroup
title={'Some title'}
size={'large'}
description={'Some description'}
>
<Button onClick={() => alert('Clicked!')}>Click me!</Button>
<Button onClick={() => alert('Clicked!')}>Click me!</Button>
<Button onClick={() => alert('Clicked!')}>Click me!</Button>
</ButtonGroup>

API

PropertyDescriptionTypeDefault
titleThe title of the groupstring-
descriptionThe description of the groupstring-
sizeDefines the size of the button.small/ middle / largemiddle
buttonsPositionDefines the horizontal position of buttons.left / center / rightcenter
fullWidthSet buttons width to fill all available spacebooleanfalse
childrenButtons used in the groupReact.ReactNode-
splitModeEnables split mode - adds borders to single-icon buttonsbooleanfalse