About this set
Two split buttons that pair a main action with a short list of related ones. The solid indigo button publishes, and its chevron opens Publish and notify subscribers, Schedule for later and Save as draft. The outlined button exports a CSV, and its chevron offers JSON, XLSX and Copy to clipboard. Use a split button when one action is the obvious default but a few variants of it should stay one click away. The main action is an ordinary button. The chevron is the summary of a native details element, so opening and closing the menu needs no JavaScript: click, Enter or Space toggles it, and the chevron turns over while the menu is open. The menu holds plain buttons separated by a divider, positioned under the right edge of the split. The outlined variant has its border darkened to meet 3:1 against the page. The Bootstrap version is a .btn-group whose details element shows a stock .dropdown-menu with .dropdown-item buttons while it is open, so it does not need the Bootstrap JavaScript bundle, and the Tailwind version uses the group-open variant for the chevron.
What’s included
- Solid and outlined split buttons
- Menu opens from a native details and summary pair, no JavaScript
- Chevron rotates while the menu is open
- Menu items are real buttons with a divider
- Outline border darkened to 3:1 against the page
Accessibility
The main action is a button with visible text, and the chevron summary has an aria-label such as More publish options; browsers expose it as expanded or collapsed. Tab reaches the main button, the chevron and, once open, each menu item, and Enter or Space opens and closes the menu. Every control shows a 2px indigo focus outline. The chevron rotation and colour transitions are removed under prefers-reduced-motion. Because it is a disclosure, the menu does not close on Escape or on an outside click.
Customise it
Change #4f46e5, #4338ca and #3730a3 in the .split-main and summary rules for the solid colour, and #838b9b on .split-ghost for the outline. In Bootstrap the same colours are --bs-btn-bg and --bs-btn-hover-bg on .split .btn and the menu uses the --bs-dropdown-* variables; in Tailwind edit the bg- and border- utilities.

















