Formssrc/components/ui/button-group.tsx

Button Group

Groups related button actions into a compact control.

Preview

Installation

Copy the component source into your project with `degit`. This port is intentionally not distributed as an npm package.

bunx degit https://github.com/LiasCode/shadcn-preact/src/components/ui#main ./src/components/ui

Usage

import {
  ButtonGroup,
  ButtonGroupSeparator
} from "@/components/ui/button-group"

export function Example() {
  return (
    <ButtonGroup>
      {/* compose the parts you need */}
    </ButtonGroup>
  )
}

API Reference

ExportPurpose
ButtonGroupComposable part exported by `@/components/ui/button-group`.
ButtonGroupSeparatorComposable part exported by `@/components/ui/button-group`.