Skip to content
satin

Button group

Buttons that belong together, joined into one block or spaced as a toolbar.

Installation

Terminal
npm i @uisatin/ui
Import
import { ButtonGroup } from '@uisatin/ui/button-group'

About 11.2 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The ButtonGroup component is a div with role="group" that joins the Buttons inside into one block and hands them a variant, size and shape. ButtonGroupSeparator divides a loose group.

PropTypeDefault
orientation
"horizontal""vertical"
"horizontal"
attached
boolean
true
variant
"primary""secondary""tertiary""inverse""destructive"
—
size
"xs""md""lg""xl"
—
shape
"default""rounded"
—
aria-label
string
—
className
string
—
ref
Ref<HTMLDivElement>
—
...props
ComponentProps<'div'>

Other attributes go to <div>

—

Accessibility

A div with role="group"; give it an aria-label that says what the buttons are for ("Text alignment"). Each button stays its own tab stop. ButtonGroupSeparator is a vertical separator.