Skip to content
ZikZuk UI

ButtonGroup

Stripe ButtonGroup

Two shapes, one look. Pass outline Buttons as children and they join into one group that arrow keys move through (Edit · Remove). Pass options with value and onValueChange and it becomes a segmented control (Day · Week · Month): exactly one stays selected and takes the brand tint at once — no gliding highlight.

pnpm add @zikzuk/ui
import { ButtonGroup } from "@zikzuk/ui";

Segmented control

Showing one week.

Joined actions

When to use

  • A chart's period.
  • Two or three equal actions on a row.

Not for

  • More than three choices — use a select.
  • Switching between kinds of work — PaneTabs.

Props

PropTypeDescription
childrenReactNodeOutline Buttons to join.
options{ value, label, aria-label?, disabled? }[]Makes it a segmented control.
value / onValueChangestring / (v) => voidControlled choice.
defaultValuestringStarting choice; defaults to the first option.
size"sm" | "default"
Default "default"
Segment height.
direction"row" | "column"
Default "row"
Stack vertically.
disabledbooleanDisable every segment.
aria-labelstringNames the group.
classNamestringExtra classes on the outer element.