Align
Proof desk
Flush actions. The group is one object, not three buttons.
Keeps related actions together as joined ghost buttons with 1px dividers.
Proof desk
Flush actions. The group is one object, not three buttons.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Button, ButtonGroup } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/button-group.
npx @noorddev/vlak-cli add button-group
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/button-group.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { Button, ButtonGroup } from "@noorddev/vlak-react";
<ButtonGroup aria-label="Alignment">
<Button variant="ghost">Left</Button>
<Button variant="ghost">Center</Button>
<Button variant="ghost">Right</Button>
</ButtonGroup>Flush joined actions. One hairline between. Group owns the outer stroke.
Also accepts HTMLAttributes<HTMLDivElement>.
| Keys | Does |
|---|---|
| Tab | Moves between the buttons |
| Enter, Space | Activates the focused button |
<div class="rs-btn-group"><button class="rs-btn-ghost">Left</button><button class="rs-btn-ghost">Center</button><button class="rs-btn-ghost">Right</button></div>