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
  • Icon Button

    Icon Button

    14
  • Background Boxes

    Background Boxes

    12
  • Chip Filter

    Chip Filter

    8
  • Typing Text

    Typing Text

    7
  • Treemap Chart

    Treemap Chart

    6
  • File Dropzone

    File Dropzone

    5
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2

More in Buttons

View all
  • Button

    Button

    166
  • Texture Button

    Texture Button

    121
  • Button

    Button

    21
  • Figma File Button

    Figma File Button

    39
  • Native Button

    Native Button

    12
  • Button

    Button

    88
  • HeroUI Button Group

    HeroUI Button Group

    11
  • Great UI Button

    Great UI Button

    19