import React from 'react' import { CButton, CDropdown, CDropdownDivider, CDropdownItem, CDropdownMenu, CDropdownToggle, CButtonGroup, CButtonToolbar, CCard, CCardBody, CCardHeader, CCol, CFormCheck, CFormInput, CInputGroup, CInputGroupText, CRow, } from '@coreui/react' import { DocsComponents, DocsExample } from 'src/components' const ButtonGroups = () => { return ( React Button Group Basic example

Wrap a series of <CButton> components in{' '} <CButtonGroup>.{' '}

Left Middle Right

These classes can also be added to groups of links, as an alternative to the{' '} <CNav> components.

Active link Link Link
React Button Group Mixed styles Left Middle Right React Button Group Outlined styles Left Middle Right React Button Group Checkbox and radio button groups

Combine button-like checkbox and radio toggle buttons into a seamless looking button group.

React Button Group Button toolbar

Join sets of button groups into button toolbars for more complicated components. Use utility classes as needed to space out groups, buttons, and more.

1 2 3 4 5 6 7 8

Feel free to combine input groups with button groups in your toolbars. Similar to the example above, you’ll likely need some utilities through to space items correctly.

1 2 3 4 @ 1 2 3 4 @
React Button Group Sizing

Alternatively, of implementing button sizing classes to each button in a group, set{' '} size property to all <CButtonGroup>'s, including each one when nesting multiple groups.

Left Middle Right
Left Middle Right
Left Middle Right
React Button Group Nesting

Put a <CButtonGroup> inside another{' '} <CButtonGroup> when you need dropdown menus combined with a series of buttons.

1 2 Dropdown Action Another action Something else here Separated link
React Button Group Vertical variation

Create a set of buttons that appear vertically stacked rather than horizontally.{' '} Split button dropdowns are not supported here.

Button Button Button Button Button Button Button Button Button Dropdown Action Another action Something else here Separated link Button Button Dropdown Action Another action Something else here Separated link Dropdown Action Another action Something else here Separated link Dropdown Action Another action Something else here Separated link
) } export default ButtonGroups