Button group
Buttons joined in a row or a column. One highlight glides from button to button under the pointer and takes the shape of each.
npx shadcn add https://kinoui.com/r/button-group.jsonCopy install command
Examples
Default
Put Buttons in a ButtonGroup and name the group with aria-label. A menu trigger, a link or a filled button joins the row the same way. For one action with a menu of others beside it, use the Split button (opens in a new tab).
Text and vertical
ButtonGroupText puts a label in the row, such as where you are. orientation="vertical" stacks the buttons.
Groups inside a group
A group of groups keeps a gap between them, and each one glides on its own.
Changing label
A button in the group can load and change its label: its neighbours make room, and the highlight follows its new size.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/button-group.json- Files
lib/reduce-motion.tslib/resize.tslib/run-progress.tslib/highlight.tslib/refs.tscomponents/kino/button-group.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
ButtonGroup
ButtonGroupText
Data attributes
Accessibility
- The group has
role="group". Name it witharia-label, so a screen reader says what the buttons are for. - Each button keeps its own place in the tab order and its own focus ring, drawn above its neighbours.
- An icon-only button needs its own
aria-label. - The highlight is decoration only: it never takes the pointer, and touch doesn’t show it.
- When the system asks for less motion, the highlight moves straight to the next button instead of gliding.