Skip to content

Repository files navigation

GitHub licensenpmcode style: prettier

A button group is a set of two or more button segments. Within the control, all segments are equal in width. A button group is often used to switch between views of some data.

Getting started

yarn add @malcodeman/react-button-group
# or
npm install --save @malcodeman/react-button-group
importReactfrom"react";import{ButtonGroup}from"@malcodeman/react-button-group";functionApp(){const[selected,setSelected]=React.useState([0]);return(<div><ButtonGroupselected={selected}onClick={(event,index)=>{setSelected([index]);}}><StyledButton>One</StyledButton><StyledButton>Two</StyledButton><StyledButton>Three</StyledButton></ButtonGroup></div>);}exportdefaultApp;

License

MIT

About

A button group is a set of two or more button segments.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages