Dropdown
When to use it
Section titled “When to use it”- To pick one value from a list of five or more, such as the property filter “All properties” on the back office calendar, or “Who” in the activity log filters.
- Use size md (36px) in forms and for the sort control on search results; use size sm (30px) in compact filter bars and table headers.
- Show the label above the field in forms. Hide it (ShowLabel off) only when the value says what it is, such as “Sort: Price, low first”.
- Always show a value in the field: the current choice or a neutral default such as “All properties”. Never leave it blank.
- Order options in a way people expect: by frequency, by time, or alphabetically, and put “All” first.
- Keep option text short enough for one line at the field’s width.
Property names. Item 3 (Figma node 200:37) is copied from Figma as written, with Figma’s spelling of the properties. The code spells it showLabel.
When not to use it
Section titled “When not to use it”- For two to four options that should stay visible: use Buttongroup type segmented, or Radiocard.
Instead: ButtonGroup (type segmented), Radiocard - To pick several values at once: use Chip filters or Checkboxes instead.
Instead: Chip, Checkbox - For actions such as “Export” or “Delete”: use Button, or a Buttongroup.
Instead: Button, ButtonGroup
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 200:30), as written. These items aren’t carried into Dropdown.intent.json, which has no field for them.
- Always show a value in the field: the current choice or a neutral default such as “All properties”. Never leave it blank.
- Order options in a way people expect: by frequency, by time, or alphabetically, and put “All” first.
- Keep option text short enough for one line at the field’s width.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
size |
md |
forms and the sort control on search results (36px) |
size |
sm |
compact filter bars and table headers (30px) |
Accessibility
Section titled “Accessibility”- The field is a native <button type=“button”> with aria-haspopup=“listbox”, so focus and disabled behaviour are the browser’s own.
src/components/Dropdown/Dropdown.tsx:145 - aria-expanded reflects whether the menu is open, and aria-controls points at the listbox only while it is open.
src/components/Dropdown/Dropdown.tsx:149 - With the label shown, the button is named by the label and its own value (aria-labelledby); with showLabel off, the label text is kept as aria-label.
src/components/Dropdown/Dropdown.tsx:152 - The open menu is a role=“listbox” named by the label (aria-labelledby, or aria-label when the label is hidden).
src/components/Dropdown/Dropdown.tsx:163 - Each option is a role=“option” with aria-selected, and the keyboard-active option is exposed through aria-activedescendant on the button.
src/components/Dropdown/Dropdown.tsx:168 - Keyboard: ArrowDown/ArrowUp open the menu and move the active option, Home/End jump to the first/last, Enter or Space choose, Escape closes, and Tab closes; focus returns to the button after choosing.
src/components/Dropdown/Dropdown.tsx:89
What this version promises
Section titled “What this version promises”From Versioning (VERSIONING.md at b9ffb76):
0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.
Two things about this release are worth knowing:
- Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
- Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.
Stories
Section titled “Stories”Label Hidden
Section titled “Label Hidden”Label And Value
Section titled “Label And Value”All Variants
Section titled “All Variants”Interactive
Section titled “Interactive”The single-variant stories (MdClosed, MdOpen, MdDisabled, SmClosed, SmOpen, SmDisabled) are cells of the variant matrix; the Design tab links each one.
Import
Section titled “Import”import { Dropdown } from "@layerbasesystemic/horizon-design-system";import type { DropdownProps, DropdownSize } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
| Prop | Type | Default | Description |
|---|---|---|---|
size |
DropdownSize |
"md" |
md field 36px (default), sm field 30px. |
label |
string |
"Label" |
Text above the field. |
showLabel |
boolean |
true |
Figma ShowLabel. When false the label text is kept as the accessible name. |
options |
string[] |
DEFAULT_OPTIONS |
Option texts in the open menu, in order. |
value |
string |
— | Current choice (controlled). Always one of options. |
defaultValue |
string |
— | Initial choice when uncontrolled; defaults to the first option. |
onValueChange |
(value: string) => void |
— | — |
open |
boolean |
— | Menu visibility (controlled). Figma state=open. |
defaultOpen |
boolean |
false |
Initial menu visibility when uncontrolled. |
onOpenChange |
(open: boolean) => void |
— | — |
disabled |
boolean |
false |
Figma state=disabled. |
name |
string |
— | Adds a hidden input so the value posts with a form. |
DropdownProps also extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" \| "defaultValue">, so native attributes pass through to the element (Dropdown.tsx:7).
Props that are not Figma properties. The stories’ header comment says: “Figma properties: size (md | sm), state (closed | open | disabled), ShowLabel -> showLabel, Label -> label, Value -> the selected entry of options. Figma’s state maps to behaviour, not a prop: closed = default; open = defaultOpen (or controlled open); disabled = disabled. Not Figma properties (added so the component is usable): options, value / defaultValue / onValueChange, open / onOpenChange, name.” (Dropdown.stories.tsx:3-7). They are declared at options, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, name.
From the release review, under “Findings outside the gates”, as written:
Props that are not Figma properties. options, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange and name (Dropdown.tsx:12 to 28), plus passthrough div attributes. The source and the QA report say they were added so the component is usable. They are public API once published (a 0.x breaking-change surface under VERSIONING.md). Owner: a human, to accept them as intended API or ask the designer to draw them.
Union types
Section titled “Union types”DropdownSize: md, sm
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property Dropdown.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--border-width-sm |
1px |
same as light |
--color-bg-elevated |
#f9fafb |
#4d5361 |
--color-border-default |
#d7dee7 |
#4d5361 |
--color-border-focus |
#1d44ba |
#6692f8 |
--color-primary-light |
#eff3ff |
#162d69 |
--color-state-disabled-bg |
#e5e7ed |
#4d5361 |
--color-text-disabled |
#d1d5db |
#6a7180 |
--color-text-primary |
#161925 |
#f9fafb |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--elevation-md |
0px 4px 8px 0px rgb(8.6% 9.8% 14.5% / 0.12) |
same as light |
--fontfamily-body |
Inter |
same as light |
--fontsize-md |
12px |
same as light |
--fontsize-sm |
11px |
same as light |
--lineheight-md |
18px |
same as light |
--lineheight-sm |
16px |
same as light |
--radius-xs |
2px |
same as light |
--spacing-md |
12px |
same as light |
--spacing-sm |
8px |
same as light |
--spacing-xs |
4px |
same as light |
This matches required_tokens in Dropdown.intent.json exactly.
Figma node
Section titled “Figma node”Page Dropdown (57:1641), documentation frame ❖ dropdown (200:10), component set dropdown (199:66). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
The page also holds _dropdown-option (199:11), which Figma describes as: “Internal part of dropdown (not for direct use). One option in the open menu: state default or selected.” Its Figma variants: state=default (199:7), state=selected (199:9).
Variant matrix
Section titled “Variant matrix”size (2) × state (3) = 6 cells. The documentation frame (196:2097) lays out state (rows: closed, open, disabled) against size (columns: md, sm), each cell an instance. The component set (199:66) publishes all 6 variants, named size=md, state=closed (199:12) through size=sm, state=disabled (199:60). In Figma, state is one property of the set. ShowLabel and Label are properties of the set, not cells; the page draws them as the instances ShowLabel: false (200:17) and Label + Value (200:24). Figma draws no hover, pressed, error or keyboard-focus states.
size |
state=closed |
state=open |
state=disabled |
|---|---|---|---|
md |
MdClosed199:12 |
MdOpen199:18 |
MdDisabled199:33 |
sm |
SmClosed199:39 |
SmOpen199:45 |
SmDisabled199:60 |
Each cell is the Storybook story for that combination and its Figma variant node. DropdownSize is the union type listed on the Code tab. state is not a prop of Dropdown, and the code has no state union type. The Dropdown.stories.tsx header comment says: “Figma’s state maps to behaviour, not a prop: closed = default; open = defaultOpen (or controlled open); disabled = disabled.” (Dropdown.stories.tsx:5-6). Each state column is the story that sets the matching props (defaultOpen for open, disabled for disabled, neither for closed). The stories that aren’t a single cell (LabelHidden, LabelAndValue, AllVariants, Interactive) are embedded on the Examples tab.
Themes
Section titled “Themes”The dropdown component set renders every cell once, in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows Dropdown’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what Dropdown.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| Field, size=md (199:14, 199:20, 199:35) | vertical padding (the code computes it from –spacing-md and –border-width-sm with calc(), not a px literal) | 9px |
padding-block: calc(var(--spacing-md) * 3 / 4 - var(--border-width-sm)); |
| Field, size=sm (199:41, 199:47, 199:62) | vertical padding (the code computes it from –spacing-md and –border-width-sm with calc(), not a px literal) | 6px |
padding-block: calc(var(--spacing-md) / 2 - var(--border-width-sm)); |
| _dropdown-option, both states (199:7, 199:9) | vertical padding (the code computes it from –spacing-md with calc(), not a px literal) | 6px |
padding-block: calc(var(--spacing-md) / 2); |
| Menu, state=open (199:24, 199:51) | drop shadow (an effect not bound to a variable) | 0 4 12 rgba(15,23,41,0.08) |
box-shadow: var(--elevation-md); |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontSize-sm |
11 |
--fontsize-sm |
11px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-sm |
16 |
--lineheight-sm |
16px |
yes |
--color-text-primary |
#161925 |
--color-text-primary |
#161925 |
yes |
--fontSize-md |
12 |
--fontsize-md |
12px |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--lineHeight-md |
18 |
--lineheight-md |
18px |
yes |
--spacing-sm |
8 |
--spacing-sm |
8px |
yes |
--spacing-md |
12 |
--spacing-md |
12px |
yes |
--radius-xs |
2 |
--radius-xs |
2px |
yes |
--border-width-sm |
1 |
--border-width-sm |
1px |
yes |
--color-bg-elevated |
#f9fafb |
--color-bg-elevated |
#f9fafb |
yes |
--color-border-default |
#d7dee7 |
--color-border-default |
#d7dee7 |
yes |
--spacing-xs |
4 |
--spacing-xs |
4px |
yes |
--color-border-focus |
#1d44ba |
--color-border-focus |
#1d44ba |
yes |
--color-primary-light |
#eff3ff |
--color-primary-light |
#eff3ff |
yes |
--color-text-disabled |
#d1d5db |
--color-text-disabled |
#d1d5db |
yes |
--color-state-disabled-bg |
#e5e7ed |
--color-state-disabled-bg |
#e5e7ed |
yes |
--fontWeight-medium, --fontWeight-regular are bound in Figma but the token build has no token of that name.
Design gaps recorded against it
Section titled “Design gaps recorded against it”Menu shadow. Dropdown.css sets box-shadow: var(--elevation-md); on the open menu. The Figma menu (node 199:24, 199:51) has a drop shadow that is not bound to a variable (see the table above).
From the release review, under “Findings outside the gates”, as written:
Menu shadow. Figma draws 0 4 12 rgba(15,23,41,.08); the code uses –elevation-md (0 4 8, alpha .12). QA recorded it as not failed by decision. Owner: the designer, to bind the effect style or add a matching token.
States Figma doesn’t draw. The component description (node 199:66) and the matrix above cover closed, open and disabled only. The stylesheet has a keyboard-focus rule at Dropdown.css:58, which Figma does not draw.
From the release review, under “Findings outside the gates”, as written:
Unspecified states. Figma draws no hover, pressed, error or keyboard-focus styling. The engineer added keyboard focus (focus-blue border and outline) and the active-option inset outline, and no hover. Owner: the designer.