amankaushik481

Split Button

Buttons

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>
  );
}

Dependencies

More by amankaushik481

View all
  • Chip Filter

    Chip Filter

    7
  • Icon Button

    Icon Button

    5
  • Background Boxes

    Background Boxes

    4
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2
  • Typing Text

    Typing Text

    1
  • Treemap Chart

    Treemap Chart

    1
  • Particles

    Particles

    1

More in Buttons

View all
  • Button

    Button

    20
  • Button

    Button

    3
  • Button Group

    Button Group

    18
  • Button

    Button

    149
  • Icon Label Subtext Button

    Icon Label Subtext Button

    69
  • Button

    Button

    9
  • Button

    Button

    37
  • Texture Button

    Texture Button

    113