About
A button with a primary action and an attached chevron that opens a dropdown of related secondary actions, including destructive ones, with the menu matched to the button's width.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Split Button to your project and fits it to your theme.
Code
How Split Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { SplitButton } from "@/components/ui/split-button";
export default function SplitButtonDemo() {
return (
<div className="flex min-h-[200px] w-full items-center justify-center">
<SplitButton
label="Save"
items={[
{ label: "Save draft" },
{ label: "Save and close" },
{ label: "Discard", destructive: true },
]}
/>
</div>
);
}














