Lists that open from a press, at the pointer, or stay on the page and are found by typing. A menu is written under the element that opens it; its parts share one json value the page holds.
Dropdown menu
Every item is given the menu's value as nav=. Arrow keys, Home and End move; letters jump to an item; Enter or Space runs it; Escape or Tab closes.
Every partLabels, groups, shortcuts, a sub-menu, a disabled item and a destructive one.
My account
Profile⇧⌘P
Billing⌘B
Settings⌘S
Keyboard shortcuts⌘K
Team
Invite users
Email
Message
More…
New team⌘T
GitHub
Support
API
Log out⇧⌘Q
menusDm.open: false
Chosen
nothing yet
Checkbox itemschecked= is written back and the menu stays open. The bars below are those three values.
Appearance
Status bar
Activity bar
Panel
editor
status bar on · activity bar off · panel off
Radio itemsgroup= is the page's value for the whole group; each item writes its own value into it.
Panel position
Top
Bottom
Right
editor
panel
position: bottom
Aligned to the end, with iconsalign="end" puts the menu's far edge on the button's. inset=true leaves room for an icon a label does not have.
Quarterly report.pdf2.4 MB · edited yesterday
Actions
Edit
Share
Download
Archive
Delete
Chosen
nothing yet
The keyboard, on a list of your ownDropdownMenuKeyboard is the hidden field every menu keeps its keys in. Given the same nav= as some items, it drives them anywhere: here, a list that is always on the page.
Edit
Cut⌘X
Copy⌘C
Copy as link
Paste⌘V
Select all⌘A
ran: nothing yet
↓↑
Next and previous, round the ends, past disabled items
HomeEnd
First and last
a…z
Jump to the item that starts so; the same letter again goes on to the next
EnterSpace
Run the active item
→←
Open and close a sub-menu
EscTab
Close the menu
Context menu
The same menu under the Context name, opened at the pointer by the other mouse button or a long press on the element it is written under.
Every partItems with shortcuts, a sub-menu, checkbox items, a label and a radio group.
Right click, or press and hold, here
Back⌘[
Forward⌘]
Reload⌘R
More tools
Save page…
Create shortcut…
Name window…
Developer tools
Delete
Show bookmarks
Show full URLs
People
Pedro Duarte
Colm Tuite
Chosen
nothing yet
bookmarks on
full URLs off
person: pedro
One per rowEach row keeps its own nav value, so each has its own menu. Duplicate and Delete change the list.
plan.moteright click
plan.mote
Open
Duplicate
Delete
shell.moteright click
shell.mote
Open
Duplicate
Delete
notes.mdright click
notes.md
Open
Duplicate
Delete
last: nothing yet3 files
Command
A list found by typing, ranked as cmdk ranks it: the whole value, then its start, the start of a word, inside a word, initials, letters in order. Keywords count nine tenths.
A list on the pageGroups, shortcuts, a disabled item, keywords (try "invoice" or "account") and the empty line (try "zzz").
Suggestions
Calendar
Search emoji
Calculator
Settings
Profile⌘P
Billing⌘B
Settings⌘S
Help
Keyboard shortcuts
Send feedback
Open the docs
typed: ""
ran: nothing yet
In a dialogCommandDialog holds the same parts in a modal. The shortcut is the page's to wire: key= and keyup= on this card keep whether ⌘ or Ctrl is down.
Or press ⌘K / Ctrl+K after a press on that button: a key is heard only while the keyboard is inside the element that listens.
Ran
nothing yet
Combobox
A button that opens a list with a field to narrow it. Enter or Space opens; arrows move; Enter picks; Escape closes. It is driven by data, not composed from parts.
One linevalue= is written back; options= are words.
A city…
city
""
Items, clear, auto highlight, disableditems= are {value, label}: the value is kept, the label shown. showClear adds a ×; autoHighlight makes the first match active as you type, so Enter picks it.
showClear{value, label} items
Next.js
autoHighlightits own empty words
Select a fruit
disabled
English
framework · fruit
next · ""
GroupsAn item of items= with items of its own is a group with a label.
Americas
Europe
Asia
Select a timezone
zone
""
Multiple, with chipsvalues= is a list, written back. The list stays open as you pick; Backspace in the empty field drops the last chip.
Next.js
Astro
stack
next, astro
The parts, by nameWhat Combobox draws itself with. Used alone they are plain pieces: here a list that is always open, filtered by a field of the page's own.