Skip to content
synccn

Button Group

Joined buttons, split buttons and vertical stacks.

Installation

$ pnpm dlx shadcn@latest add @synccn/button-group

First time in this project? Connect synccn with one command.

Usage

import { ButtonGroup } from "@/components/ui/button-group";<ButtonGroup>  <Button variant="outline">Day</Button>  <Button variant="outline">Week</Button></ButtonGroup>

API reference

Generated from the component's TypeScript types, so it always matches the code.

ButtonGroup

Joins buttons into one control: shared borders, outer corners only. Works with Button, DropdownMenu triggers and Inputs.

  • orientation
    "horizontal" | "vertical"

    Default "horizontal"

    Direction the buttons are joined in.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA roles: group
  • Shows a visible focus ring for keyboard users