Search

Search documentation

Button Group

A set of buttons grouped together.

Installation

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

Usage

import {
  ButtonGroup,
  ButtonGroupText,
  ButtonGroupSeparator,
} from "@/components/ui/button-group";
<ButtonGroup>
  <Button variant="outline">One</Button>
  <Button variant="outline">Two</Button>
  <Button variant="outline">Three</Button>
</ButtonGroup>

Type Definitions

interface ButtonGroupProps {
  /** The orientation of the button group */
  orientation?: "horizontal" | "vertical";
ButtonGroupProps.orientation?: "horizontal" | "vertical" | undefined

The orientation of the button group

}

Examples

Horizontal

Vertical

With Icon

With Text and Separator

Format

API Reference

ButtonGroup

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"The orientation of the button group.
classNamestring-Additional CSS classes

ButtonGroupText

PropTypeDefaultDescription
asChildbooleanfalseChange the component to the HTML tag or custom component of the only child.
classNamestring-Additional CSS classes

ButtonGroupSeparator

PropTypeDefaultDescription
orientation"horizontal" | "vertical""vertical"The orientation of the separator.
classNamestring-Additional CSS classes

On this page