Skip to content
Ballpoint

Button Group

Buttons, inputs and labels set edge to edge in a row or column, so they read as one control.

From shadcn/ui

Installation

pnpm dlx shadcn@latest add @ballpoint/button-group

Usage

tsx
import { Button } from "@/components/ui/button"
import { ButtonGroup } from "@/components/ui/button-group"

<ButtonGroup>
  <Button variant="outline">Archive</Button>
  <Button variant="outline">Report</Button>
</ButtonGroup>

Examples

Split button

A main action with a menu of variations beside it.

With an input

A field joined to the button that acts on it, or to a fixed prefix.

https://

Vertical

A column, for zoom controls and toolbars.

API reference

orientation
default "horizontal"
"horizontal" | "vertical"

Which way the group runs.

ButtonGroupText
div

A boxed label among the buttons, such as a prefix.

ButtonGroupSeparator
Separator

A pen rule between two buttons.

Pen settings

The drawing also takes draw, roughness, passes, radius, corners, weight and speed, as props or from the nearest InkProvider. What each one does.