Skip to main content

Starwind UI v1.12 is now available!

Button Group

Installation

Usage

Orientation

Set the orientation prop to change the button group layout.

Size

Control the size of buttons using the size prop on individual buttons.

Nested

Nest ButtonGroup components to create button groups with spacing.

Separator

The ButtonGroupSeparator component visually divides buttons within a group.

Buttons with variant outline do not need a separator since they have a border. For other variants, a separator is recommended to improve the visual hierarchy.

Split

Create a split button group by adding two buttons separated by a ButtonGroupSeparator.

Input

Wrap an Input component with buttons.

Select

Pair with a Select component.

Create a split button group with a dropdown menu.

API Reference

ButtonGroup

The container component that groups related buttons together.

PropTypeDefault
orientation"horizontal" | "vertical""horizontal"
classstring-
<ButtonGroup orientation="horizontal">
<!-- Buttons -->
</ButtonGroup>

ButtonGroupSeparator

A visual separator component for dividing buttons within a group.

PropTypeDefault
orientation"horizontal" | "vertical""vertical"
classstring-
<ButtonGroupSeparator orientation="vertical" />

ButtonGroupText

A text label component for adding descriptive text within a button group.

PropTypeDefault
classstring-
<ButtonGroupText>
Label text
</ButtonGroupText>

Changelog

v1.0.0

  • Initial release with starwind v1.12