Skip to content

Button Group

The ButtonGroup component is a flexible container designed to horizontally or vertically group adjacent interactive elements, such as Button, Input, and Select. By wrapping these items, it removes redundant borders and applies unified corner styling, creating the appearance of a single, composite control.

Since OrbitUI components are copied directly into your project, you’ll add the ButtonGroup component using the OrbitUI CLI:

Terminal window
npx orbitkit@latest add button-group

Import the ButtonGroup component and wrap the interactive elements you want to group.

To stack elements vertically, use the orientation="horizontal" prop.

Nest <ButtonGroup> components to create button groups with spacing.

Wrap an Input ans select component with buttons.

The ButtonGroup component accepts standard HTML attributes for <div> and the orientation property to control the direction of the elements.

PropTypeDefault
orientationvertical, horizontalvertical
  • orientation: Defines whether elements are grouped in a row (vertical) or a column (horizontal).