Skip to content

Button Group

Value: center
Terminal window
npx skeci-ui add button-group
import { ButtonGroup, ButtonGroupItem } from '@/components/ui/button-group';
<ButtonGroup defaultValue={["center"]}>
<ButtonGroupItem value="left">Left</ButtonGroupItem>
<ButtonGroupItem value="center">Center</ButtonGroupItem>
<ButtonGroupItem value="right">Right</ButtonGroupItem>
</ButtonGroup>

Multiple Selection

Vertical Orientation

Sizes

PropTypeDefaultDescription
type'single' | 'multiple''single'Determines whether one or multiple items can be selected.
defaultValuestring[]The initial selected values.
onValueChange(value: string[]) => voidEvent handler for when selection changes.
variant'outline' | 'filled''outline'The visual style of the buttons.
size'sm' | 'md' | 'lg''md'The size of the buttons.
orientation'horizontal' | 'vertical''horizontal'The orientation of the group.
PropTypeDefaultDescription
valuestring(required)A unique value for the item.
disabledbooleanfalseWhether the item is disabled.