Ravox KitBasics

Button Group

Neighboring actions joined into one piece, horizontal or vertical: Publish | ▾, − 1 +, prefix + field + copy. Separator for solid buttons, fixed text and a toolbar mode with keyboard arrows.

Settings

Variante
Tamanho
Orientação

Examples

Main action with more options

Quantity

2

Toolbar (keyboard arrows)

With field and fixed text

https://

Vertical pagination

Installation

The command creates components/ui/button-group.tsx in your project and installs the theme with it. The file is yours: edit it as you like.

npx @ravox-ui/cli add button-group

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Direction in which the pieces are joined.
variantvariant do Button—Default for every child <Button> (each one can still pass its own).
sizesize do Button—Default for every child <Button>.
toolbarbooleanfalseBecomes role="toolbar": one Tab stop, with arrows, Home and End moving between buttons.
...propsComponentProps<"div">—role="group" by default: give it an aria-label that says what the group does.
ButtonGroupSeparatorcomponente—Line between two solid buttons. In outline, the border already separates them.
ButtonGroupTextcomponente—A piece of fixed text: "https://", "$", "/month".

More in Basics