ButtonGroup API
Every prop of the 3 parts ButtonGroup exports, plus the 1 symbol it exports alongside them, generated from the package manifest.
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from '@oceanic-hub/brand-system'- Layer
- core — shadcn-derived primitives.
- Exports
- ButtonGroup · ButtonGroupSeparator · ButtonGroupTextalso: buttonGroupVariantstypes: ButtonGroupProps · ButtonGroupTextProps
- Variants
- orientation: horizontal | vertical
- Contract
- packages/brand-system/src/components/button-group.contract.test-d.ts
- Demos
- 3 on the ButtonGroup page — rendered live, hydrated
- Source
- packages/brand-system/src/components/button-group.tsx
Generated from manifest/component-manifest.json, so it cannot drift from the source. For what ButtonGroup is for, how it composes and what it looks like, see ButtonGroup.
ButtonGroup
ButtonGroupProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof buttonGroupVariants>.
ButtonGroupSeparator
Inherited from the primitive underneath — this package adds none of its own. DOM attributes are accepted too and omitted here.
Prop
Type
ButtonGroupText
ButtonGroupTextProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>.
buttonGroupVariants
A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.
(props?: ({ orientation?: "horizontal" | "vertical" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): stringParameters
Prop
Type
Variant axes
Read off the component's own cva config, so this table and the parts that consume it cannot disagree.
Prop
Type