Dropdown
The following page documents visual specifications such as color, typography, structure, and size and AI presence.
Color
Element | Property | Color token |
---|---|---|
Label | text-color |
|
Field text | text-color |
|
Field text: prompt | text-color |
|
Helper text | text-color |
|
Field | background-color |
|
border-bottom |
| |
Chevron icon | svg |
|
Vertical divider | border |
|
Menu option | text-color |
|
background-color |
| |
border-top |
| |
Menu | box-shadow |
|
Checkbox icon | background-color |
|
check |
| |
border |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default dropdown variant examples](/static/c11797e39ed8e9b78d5629743d1f54f3/3cbba/dropdown-style-1.png)
![Fluid dropdown variant examples](/static/54b64334abfcbd54c2f7f0c6cb6ccab6/3cbba/dropdown-style-1b.png)
Color states of dropdown, combo box, and multiselect.
Interactive states
State | Element | Property | Color token |
---|---|---|---|
Focus | Field | border |
|
Hover | Field | background-color |
|
Menu option | background-color |
| |
Menu option | text-color |
| |
Invalid | Error icon | svg |
|
Field | border |
| |
Error message | text-color |
| |
Warning | Warning message | text-color |
|
Warning icon | svg |
| |
Active | Menu option | background-color |
|
Selected | Chevron icon | svg |
|
Vertical divider | border |
| |
Close icon | svg |
| |
Menu option | background-color |
| |
Menu option | checkmark |
| |
Multiselected | Tag | background-color |
|
Tag | text-color |
| |
Disabled | Field | background-color |
|
Field (default) | border-bottom | transparent | |
Field (fluid) | border-bottom |
| |
Field | text-color |
| |
Label | text-color |
| |
Chevron icon | svg |
| |
Read-only | Field | border-bottom |
|
Field (default) | background-color | transparent | |
Field (fluid) | background-color |
| |
Label | text-color |
| |
Field text (default) | text-color |
| |
Field text (fluid) | text-color |
| |
Tag | background-color | transparent | |
Tag | border |
| |
Tag (default) | text-color |
| |
Tag (fluid) | text-color |
| |
Tag | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default dropdown interactive states](/static/27016d13ecd399c9dafcbd8ed0be1fff/3cbba/dropdown-style-default-states.png)
![Fluid dropdown interactive states](/static/c433306708b5d3677a269824438a4b97/3cbba/dropdown-style-fluid-states.png)
Dropdown interactive states
![Default combo box interactive states](/static/b51694b59cfa15d3ee4beaa5ed559898/3cbba/combobox-style-default-states.png)
![Fluid combo box interactive states](/static/44665922aacfbf52829ca5bd00a8ade6/3cbba/combobox-style-fluid-states.png)
Combo box interactive states
![Default multiselect interactive states](/static/3e9b91148d338fd59b68262e2a4418d2/3cbba/multiselect-style-default-states.png)
![Fluid multiselect interactive states](/static/e3041f3b34fc97ee7b133f4c3029f6e4/3cbba/multiselect-style-fluid-states.png)
Multiselect interactive states
Inline dropdown
State | Element | Property | Color token |
---|---|---|---|
Enabled | Field | background-color | transparent |
Field text | text-color |
| |
Chevron icon | svg |
| |
Menu option | text-color |
| |
Menu option | background-color |
| |
Hover | Field | background-color |
|
Menu option | background-color |
| |
Menu option | text-color |
| |
Active | Menu option | background-color |
|
Selected | Menu option | background-color |
|
Menu option | checkmark |
| |
Invalid | Field | border |
|
Error message | text-color |
| |
Error icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Inline dropdown states](/static/8670784344cd145e16bd389d94364f6a/3cbba/dropdown-style-4.png)
Inline dropdown states
Typography
All dropdown text should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized. Dropdown menu option text should not exceed three words.
Element | Font-size (px/rem) | Font-weight | Type token |
---|---|---|---|
Label | 12 / 0.75 | Regular / 400 |
|
Field text | 14 / 0.875 | Regular / 400 |
|
Menu option text | 14 / 0.875 | Regular / 400 |
|
Helper text | 12 / 0.75 | Regular / 400 |
|
Error message | 12 / 0.75 | Regular / 400 |
|
Structure
Dropdowns have two states, open and closed. An open and closed dropdown should be the same width and appropriately fit the design, layout, and content.
Default dropdown
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | margin-bottom | 8 / 0.5 |
|
Field | padding-left | 16 / 1 |
|
padding-right | 48 / 3 |
| |
border-bottom | 1px | – | |
Chevron icon | padding-right, padding-left | 16 / 1 |
|
Helper text | margin-top | 4 / 0.25 |
|
State icon | padding-right, padding-left | 16 / 1 |
|
![Structure and spacing for a default dropdown](/static/6fdfd634fb5bde2ec38e302d8ea5a119/3cbba/dropdown-style-5.png)
Structure and spacing measurements for default dropdown | px / rem
Fluid dropdown
Fluid components for all dropdown variants would adhere to the same specs as the dropdown fluid component.
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | margin-bottom | 4 / 0.25 |
|
Field | padding-left | 16 / 1 |
|
padding-right | 48 / 3 |
| |
border-bottom | 1px | – | |
margin-top, margin-bottom | 13 / .8125 | – | |
Chevron icon | padding-right, padding-left | 16 / 1 |
|
State icon | padding-right, padding-left | 16 / 1 |
|
![Structure and spacing for a fluid dropdown](/static/c224a3024c05e9973b14269b9cbfd32f/3cbba/dropdown-style-5b.png)
Structure and spacing measurements for a fluid dropdown | px / rem
Combo box
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | margin-bottom | 8 / 0.5 |
|
Field | padding-left | 16 / 1 |
|
padding-right | 72 / 4.5 | – | |
Chevron icon | padding-right | 16 / 1 |
|
Vertical divider | padding-right, padding-left | 8 / 0.5 |
|
Clear icon | padding-right | 8 / 0.5 |
|
![Spacing for combo box dropdown](/static/dba5ce8dae6501873f06135f34c57d1f/3cbba/dropdown-style-6.png)
Spacing for combo box dropdown | px / rem
Multiselect dropdown
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | margin-bottom | 8 / 0.5 |
|
Field | padding-left | 16 / 1 |
|
padding-right | 48 / 3 |
| |
Chevron icon | padding-left, padding-right | 16 / 1 |
|
Tag | height | 24 / 1.5 | – |
padding-right | 8 / 0.5 |
| |
Checkbox icon | padding-left | 16 / 1 |
|
padding-right | 8 / 0.5 |
|
![Structure and spacing for a multiselect dropdown](/static/6d31b906a1a548f8f89800cfc44fe6d2/3cbba/dropdown-style-7.png)
Structure and spacing measurements for a multiselect dropdown | px / rem
Inline dropdown
Element | Property | px / rem | Spacing token |
---|---|---|---|
Field text | padding-right, padding-left | 16 / 1 |
|
Menu option | padding-right, padding-left | 16 / 1 |
|
Chevron icon | padding-left | 16 / 1 |
|
![Structure and spacing for inline dropdown](/static/b21558596c99ee8eca44990568116892/3cbba/dropdown-style-8.png)
Structure and spacing for inline dropdown | px / rem
Sizes
Default inputs
The field height and menu option height should always match. These size options can be applied to all variants of dropdown.
Element | Size | Height px / rem |
---|---|---|
Field | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 | |
Menu item | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 |
![Sizes for dropdown](/static/489c7140b9daa17693840289fd55773a/3cbba/dropdown-style-size-fixed.png)
Default dropdown sizes | px / rem
Fluid inputs
There is only one input height but there are two menu item sizes–default and condensed.
Element | Size | Height px / rem |
---|---|---|
Field | Default | 64 / 4 |
Menu item | Default | 64 / 4 |
Condensed | 40 / 2.5 |
![Sizes for dropdown](/static/9deeb559eaebb0c30ac227d99b0953cc/3cbba/dropdown-style-size-fluid.png)
Fluid dropdown sizes | px / rem
AI presence
The following are the unique styles applied to the component when the AI label is present. Unless specified, all other tokens in the component remain the same as the non-AI variant.
For more information on the AI style elements, see the Carbon for AI guidelines.
Element | Property | Token / Size |
---|---|---|
Linear gradient | start |
|
stop |
| |
Field | border-bottom |
|
background color |
| |
AI label | size | mini |
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default dropdown AI example](/static/b11c3d3d67baafc39519f614d9c31af1/3cbba/dropdown-style-ai-presence-ai-revert-default.png)
![Fluid dropdown AI example](/static/13e418b2583215a8856e014ce44780f7/3cbba/dropdown-style-ai-presence-ai-revert-fluid.png)