Dropdown: a floating list of options, built as a reusable component
Learn the parts, states, and behavior rules a design system must define for a dropdown, and when to choose a different control.
In short
A dropdown is a floating list of options built as a reusable component, with defined parts, states and behavior rules, and sometimes a better control exists.
12 min readFree
What you will learn
A dropdown is a button or field that opens a short list of choices in a floating panel. The panel sits on top of the page. When the user picks an item or closes the panel, the panel goes away.
In a design system, a dropdown is a reusable component. The team agrees on one design, and writes down its parts, its states, and how it behaves. Then every product team builds it the same way. This lesson shows you what to write down and why.
By the end, you will be able to name the parts of a dropdown, list the states of each part, write the behavior rules a team needs, and decide when a dropdown is the wrong tool.
Key words
- Design system
- A shared set of rules, parts, and reusable components that a company uses to build all its screens in the same way.
- Component
- One reusable piece of a screen, such as a button, a checkbox, or a dropdown, built once and used many times.
- Trigger
- The thing the user clicks or taps to open a dropdown. It is usually a button or a field.
- Floating panel
- A box that appears on top of the page near the trigger. It does not push the other content aside.
- Item
- One choice or action inside the panel, such as Copy or Delete.
- State
- The look and condition of a part at one moment, such as hover (the mouse is over it), focus (the keyboard has moved to it), or disabled (it cannot be used).
- Escape key
- The key labeled Esc on most keyboards. Users press it to back out of something.
What are the parts of a dropdown?
Anatomy means the named pieces that make up the component. A good system gives each piece a name, so designers and developers can talk about the same thing. A standard dropdown has five parts.
Trigger
The control that opens the panel. It shows a label and often a small arrow to hint that more choices are hidden. A trigger can be a button with text, an icon-only button with three dots, or a field that shows the current choice.
Floating menu
The panel itself. It holds the items and appears in front of other UI.
Items
The rows the user can pick. Each item has a label, and may also have an icon, a short hint, or a shortcut text on the right.
Dividers
Thin lines that split the panel into areas. They tell the user that the items above and below are different kinds of action.
Groups
Sets of related items under a small heading, such as Clone or Sort by. Groups help the user scan a long panel fast.
Write this list into the system first. If a team later asks whether a dropdown can have a heading inside it, the answer is already defined: groups can have headings, and dividers separate groups.
What are the states of each part?
A state is how a part looks and behaves at one moment. Each part of the dropdown can have its own states. Not every state applies to every part. For example, a divider has no hover state, and a group heading cannot be selected.
Default
The normal look when nothing is happening. The trigger shows its label, and the item shows plain text on a plain background.
Hover
The look when a mouse pointer is over the part. Items usually get a light background color.
Focus
The look when the keyboard has moved to the part.
Selected
The look for the choice the user has already made. A checkmark or a bold label often shows it. In an action menu, a selected state may not be needed at all.
Disabled
The look for a choice that exists but cannot be used right now.
Open
The state of the trigger and panel while the panel is visible.
Tip
Write a small table in your spec. List the parts across the top and the states down the side. Mark each cell as used, not used, or needs a rule. This stops gaps, such as a disabled group heading that nobody designed.
What are the common variants?
A variant is a version of the same component with a different purpose or look. You do not need a new component for each one. You need a clear name and rules for each variant.
Action menu
A panel of commands that act on something, such as Edit, Duplicate, or Delete. Each item does a job and then the panel closes.
Navigation menu
A panel of links that take the user to other pages or sections. Items act like links. The panel may stay open while the user moves through nested groups.
With icons
Items start with a small picture, such as a trash can for Delete. Icons help people find an item faster, but each icon must have a text label too, so the meaning is not lost.
With checkmarks
Items show a check mark next to the one that is active. This variant is used when the user is choosing one setting from a set, such as a view mode.
Worked example: the repository page
Look at a code hosting site such as GitHub. Walk through them in order, and notice which part of the anatomy each one uses.
- 1
Find the trigger
The Code button is the trigger. It has a label and a small arrow. The arrow tells you there is more to see after you click.
- 2
Open the floating menu
Click the trigger. A panel appears under the button. It floats above the page, and the rest of the page does not move.
- 3
Read the groups
The panel is split into sections, each with a heading. The clone options sit in their own group, separate from other choices.
- 4
Notice the three-dot menus
Three-dot buttons open action menus. These menus use dividers to separate groups of related actions, and some items show small icons beside their labels.
- 5
Move with the keyboard
Press Enter, Space, or the Down Arrow key on a trigger to open its menu.
Tip
When you study a real product, write down which part of the anatomy each element is. This turns a screen you have seen a hundred times into a set of rules you can reuse.
Which behavior rules should you write into the system?
Looks are only half the component. The other half is how it behaves. A system must write down these rules, so that every product opens and closes the dropdown in the same way. Four rules matter most.
Opening
A click or tap on the trigger opens the panel. Many systems also open it with the Enter or Space key, or with a down arrow when the trigger has focus.
Closing after a choice
Write which rule applies to each variant.
Outside click
Without this rule, panels pile up and cover the page.
Escape key
Pressing Escape closes the panel and sends the focus back to the trigger. The user does not lose their place.
Quick check
A user opens an action menu from a three-dot button, then presses Escape. Which result does the system rule describe?
How should a dropdown be placed near screen edges?
Placement is where the floating panel appears. But a trigger near the bottom or the right edge of the screen may not leave room for the whole panel. This is called a collision.
Flip
If there is no room below, the panel opens above the trigger instead. This is the most common fix.
Shift
If the panel would run off the side of the screen, it slides sideways until it fits, while staying attached to the trigger.
Scroll or resize
If the panel is taller than the space available, it gets a scroll bar or a smaller height. It must never be cut off without a way to reach the rest.
Tip
Write the order of these fixes in your spec. A written order stops every team from inventing its own.
Quick check
A three-dot button sits near the bottom of a phone screen. Opening its action menu below would hide most of the items. What should the system do?
Keyboard support
Many people use a keyboard, a screen reader, or switch devices instead of a mouse. A system must say how each key works. The W3C Authoring Practices Guide describes a standard pattern for menus. Teams can use it as a starting point.
Enter or Space
Opens the panel from the trigger and places focus on the first item.
Arrow keys
The Down and Up arrows move the focus from item to item.
Escape
Closes the panel and returns the focus to the trigger.
Tab
The system must choose one behavior and state it.
Focus must always be visible. If the user cannot see where they are, the component fails them, even if every key works.
Long lists and scrolling
Some dropdowns hold dozens of items, such as a list of projects or branches. A long list can scroll with a scroll bar, and users can find items quickly by typing ahead.
Tip
Set one maximum height for the panel in the system, for example a set number of visible items. Then add a search field at the top when the list is long. Do not let each product pick its own height.
When the panel scrolls, the focus must follow the arrow keys. If the user presses Down and the highlighted item is out of view, the panel should scroll so the item shows.
When to use a dropdown, and when not to
A dropdown hides choices until the user asks for them. That is useful for a long set of options, but it also costs the user an extra click. Use it for the right job.
Use it for actions
A three-dot menu with Edit, Share, and Delete is a good fit. The user wants a few commands, and does not need to compare them.
Use it for navigation
A menu of links to sections of a site is a good fit when there are too many links for the main bar.
Use Select for form fields
If the user is filling in a form and the choice will be saved with it, such as a country, use the Select component.
Quick check
A checkout form asks for the shipping country. The field must hold the chosen value and send it with the form. Which component should the system use?
Alternatives to a dropdown
Sometimes a dropdown is the wrong tool. The system should list these alternatives, so teams pick the right one.
Radio buttons
Best when there are only a few choices, and the user should see them all at once. Hiding two or three options behind a click adds work for no gain.
Tabs
Tabs show the switch in plain sight. A dropdown would hide the views.
Modal
A modal is a window that blocks the page until the user finishes. Use it for complex choices with several fields or a long explanation, not for a short list.
Select
Best for choosing one value inside a form, as described above.
Writing the component spec
A spec is the written record that a team uses to build and check the component. A dropdown spec should be short enough to read in one sitting, and complete enough that two teams would build it the same way.
- 1
Name the parts
List the trigger, floating menu, items, dividers, and groups, with one line for each.
- 2
List the states
Use the table from the states section. Mark every state that applies to each part, and write a rule for the ones that need one.
- 3
Write the behavior
State how the panel opens, closes, handles outside clicks, places itself near edges, and scrolls long lists.
- 4
Write the keyboard rules
List each key and what it does. Include a note on where the focus goes after the panel closes.
- 5
Add when not to use it
Name the alternatives, such as Select, radio buttons, tabs, and modals, and the situations that call for each one.
Tip
Test your spec on one real screen. Pick a screen from your own project or a product you know, build the dropdown from the spec alone, and note every question you could not answer. Those gaps belong in the spec.
Summary
A dropdown is a trigger that opens a floating panel of items. Its anatomy is the trigger, the floating menu, items, dividers, and groups. Each part has states, from default to disabled. Its behavior rules cover opening, closing, outside clicks, Escape, placement near edges, keyboard keys, and long lists. Use it for actions and navigation, use Select for form values, and reach for radio buttons, tabs, or a modal when the situation calls for them.
Sources
Last updated on 17 November 2026
Related lessons
Learn with me
Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.