About
A set of buttons fused edge-to-edge into one segmented control, usable either as a single-choice radio-style switch or as a wrapper that joins existing buttons into one toolbar.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Button Group to your project and fits it to your theme.
Code
How Button Group is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import ButtonGroup from "@/components/ui/button-group";
import { Icon } from "@/components/ui/button-group-utils/icon";
const btn = {
display: "inline-flex",
alignItems: "center",
gap: 6,
padding: "10px 16px",
fontSize: 14,
fontWeight: 600,
fontFamily: "inherit",
border: "1.5px solid var(--border)",
background: "var(--card)",
color: "var(--foreground)",
cursor: "pointer",
};
export default function ButtonGroupWrapperDemo() {
return (
<div
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
minHeight: 240,
width: "100%",
background: "var(--background)",
color: "var(--foreground)",
}}
>
<ButtonGroup>
<button type="button" style={btn}>
<Icon name="chevron-left" size={16} />
Back
</button>
<button type="button" style={btn}>
Forward
<Icon name="chevron-right" size={16} />
</button>
</ButtonGroup>
</div>
);
}
















