Button group

Split Save Button

A split button: the frequent action fires straight away while the rare ones live in a native popover menu — top layer, Esc and outside click come from the browser.

React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.

What you can change

  • the main action caption through action
  • the menu contents through options
  • the caret's screen-reader name through menuLabel and the menu id through menuId

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme
Split Save Button — A split button: the frequent action fires straight away while the rare ones live in a native popover menu — top layer, Esc and outside click come from the browser.

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.club/c/buttongroup-003?lang=en&theme=dark

2Paste into the chat
3Get it in your project

Not sure where to paste it? Step-by-step guide

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

Loading…

How to use

<Buttongroup003
  action="Save"
  options={[{ label: "Save and close", hint: "Back to the list" }]}
  menuLabel="Other ways to save"
  menuId="save-menu"
/>

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Action
action · default: Save
Menu name
menuLabel · default: Other ways to save
Accent
accent · default: theme colour

FAQ

How do I add Split Save Button with Cursor or Claude Code?
Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
What does Split Save Button depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in Split Save Button?
Adapt: the main action caption through action; the menu contents through options; the caret's screen-reader name through menuLabel and the menu id through menuId. Keep as installed: the local --vibeui-buttongroup-003-* palette — do not swap it for your theme tokens; the native popover instead of a hand-rolled menu: Esc, outside click and the top layer are already done; the aria-label on the caret: a button without text is otherwise announced as a meaningless "button".
Is Split Save Button free?
Yes. The preview is open without an account; with a free account you can copy up to 20 components a month.

For developers

npx shadcn@latest add https://vibeui.club/r/pro/buttongroup-003.json

This command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options

Technical notes

The component is self-contained: one file, no dependencies, its own palette in the --vibeui-buttongroup-003-* variables. It is a server component: the menu state is held by the browser through popover and popovertarget, there is no client JS. The positioning comes from CSS anchor positioning inside @supports (anchor-name), with position-try-fallbacks:flip-block; where anchor positioning is unsupported, the popover stays a card in the middle of the screen — that is a working view, not a breakage. The border between two fills of the same colour is drawn with an inset box-shadow, because a border at the joint would leave a dark line. The [data-part="menu"]:not(:popover-open){display:none} rule hides the menu until it opens.

Tags

  • buttongroup
  • split
  • popover
  • menu
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…