Prodular UI

Button group

Joins related buttons, inputs and labels into one row with shared borders.

npx prodular-ui add button-group

Actions and split button

With an input or text

https://
24

Anatomy

<ButtonGroup aria-label="Conversation actions">  <Button variant="outline">Reply</Button>  <Button variant="outline">Archive</Button></ButtonGroup>

Guidance

Use it when

  • Two to four actions on the same object, such as Reply, Snooze, Archive.
  • A split button: a main action with a menu of variants.
  • An input with a fixed prefix and an action, or a stepper.

Avoid

  • Mixing variants inside one group, other than a split button.
  • Choosing between options. Use ToggleGroup.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Use the same variant and size for every button in a group.
  • Give the group an aria-label that names what the actions act on.
  • Use ButtonGroupText for static text such as a protocol or a count.
  • Nest ButtonGroups to put a gap between clusters.

API

ButtonGroup

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Direction. Borders and corners adjust.

ButtonGroupText

PropTypeDefaultDescription
renderReactElementRender as another element, such as a Label.

ButtonGroupSeparator

PropTypeDefaultDescription
orientation"vertical" | "horizontal""vertical"A hairline between buttons that have no border.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add button-group# or, with the registry in components.jsonnpx shadcn@latest add @prodular/button-group