DOCS
v0.4

Components / Button Group

Button Group

Groups buttons with optional attached mode where borders merge.

actions v0.1.0

Playground

Examples

Attached
LeftCenterRight
<cg-button-group attached><cg-button variant="secondary">Left</cg-button><cg-button variant="secondary">Center</cg-button><cg-button variant="secondary">Right</cg-button></cg-button-group>

Import

import { CgButtonGroup } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/cg-button-group';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
direction "row" | "column" "row" Layout direction
attached boolean false Merge borders