dropdown-button
Skill2 starsChanged 13 days agoMITView on GitHub
Conventions for dropdown buttons and split buttons in the Patio web UI (web/src); use when adding a button that opens a menu of options, or an action button with a chevron menu of alternatives.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibilitySkill
- connector-requiredSkill
- frontend-designSkill
- golang-patternsSkill
- golang-testingSkill
- icon-buttonSkill
- list-viewSkill
- releaseSkill
- searchable-dropdownSkill
- seoSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use Menu when a button opens a list of actions or choices:
- Very specific: line 30
Use SplitButton when one option is the common default and alternatives belong behind a chevron:
- Distinctive: line 49
Don't hand-roll two adjacent buttons to mimic a split button.
- Very specific: line 50
Don't use native <select> for actions.
- Very specific: line 51
Don't use title= tooltips.
- Distinctive: line 52
Don't add colored accent stripes (AGENTS.md).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dropdown and split buttons
Reference: Menu in web/src/Menu.tsx, SplitButton in web/src/SplitButton.tsx, and .menu, .menu-list, .split-button, .split-toggle rules in web/src/styles.css. Examples: row actions in web/src/Skills.tsx and split layout in web/src/Chats.tsx.
Dropdown buttons
Use Menu when a button opens a list of actions or choices:
<Menu label="More actions" buttonClassName="icon ghost" button={<Icon name="more" />}>
{(close) => (
<button role="menuitem" onClick={() => (close(), doAction())}>
<Icon name="pencil" /> Edit
</button>
)}
</Menu>Menu takes label, button, optional buttonClassName, and children(close). For an icon-only trigger, use buttonClassName="icon ghost"; label becomes its aria-label. Use chevronDown for a choice menu or more for overflow actions. A text trigger can show its label with a chevron, for example <button>Sort <Icon name="chevronDown" /></button>.
Menu contents are buttons with role="menuitem" and optional Icon. Call close() in each item's onClick. Use close(false) when opening a dialog that takes focus, so closing the menu does not steal focus back to its trigger. Menu handles ArrowUp/ArrowDown navigation and Escape; don't reimplement those keys.
Split buttons
Use SplitButton when one option is the common default and alternatives belong behind a chevron:
<SplitButton icon="columns" label="Split side by side" menuLabel="Split options" onClick={splitSideBySide}>
{(close) => (
<>
<button role="menuitem" onClick={() => (close(), splitSideBySide())}>Side by side</button>
<button role="menuitem" onClick={() => (close(), splitStacked())}>Stacked</button>
</>
)}
</SplitButton>Props are icon, label, onClick, menuLabel, and children(close). Main half runs fixed default action; chevron half opens alternatives. Include default among menu items too. Choosing an item does not change default action.
Split control looks like one control: shared background on hover/focus, divider appears on hover, and each half darkens separately. Chevron half is 24px wide—the one exception to 40×40 icon-button size. Main half is currently icon-only; if text main half becomes necessary, extend SplitButton rather than hand-rolling one.
Avoid
- Don't hand-roll two adjacent buttons to mimic a split button.
- Don't use native
<select>for actions. - Don't use
title=tooltips; use accessible labels and shared tooltip conventions. - Don't add colored accent stripes (AGENTS.md).
Checklist
- Uses
MenuorSplitButtonfor the matching interaction. - Trigger has a clear accessible
label; menu has a descriptivelabel/menuLabel. - Menu actions use
role="menuitem"and close the menu after selection. - Dialog-opening menu action calls
close(false)when focus should stay in dialog. - Split menu includes default action; main default remains fixed after a choice.
- Arrow keys and Escape work through built-in
Menubehavior. - No
title=, native action<select>, hand-rolled split, or colored accent stripe.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

