role disclosure
Dropdown draft v0.4.1
A button that opens a menu of related actions.
A dropdown gathers actions that relate to one purpose (share, export, more actions on a row) behind a single button, and shows them in a menu when the button is activated. Activating an action closes the menu. The trigger is the Button component, so it takes every emphasis, intent and size of the button. A dropdown offers actions: choosing a value is the Select component, and a button whose main action sits next to its menu is the Split button component.
Playground
Token inspector
Part container
Not rendered in this configuration.
No tokens of its own: it inherits from its parent.
Part trigger
Not rendered in this configuration.
No tokens of its own: it inherits from its parent.
Part indicator
Not rendered in this configuration.
No tokens of its own: it inherits from its parent.
Part menu
Not rendered in this configuration.
-
background from default
{global.bg.level.2.default}Details
- Resolves through
global.bg.base.neutral.1 semanticlight-switch.base.25 rawneutral.light.ash.25 raw- Value
-
#FDFDFDdark:#282828 - CSS
--dropdown-menu-background- Token
dropdown.menu.background- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- The dropdown is accessible in every state without relying on code the consumer has to write. On the web, the reference implementation works without any script: the trigger opens a native popover and the menu follows the disclosure pattern, items being buttons and links reached with Tab, never an ARIA menu.
-
border-color from default
{global.border.level.edge.level.2}Details
- Resolves through
light-switch.base.200 rawneutral.light.ash.200 raw- Value
-
#DFDBDCdark:#303030 - CSS
--dropdown-menu-border-color- Token
dropdown.menu.border-color- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- The dropdown is accessible in every state without relying on code the consumer has to write. On the web, the reference implementation works without any script: the trigger opens a native popover and the menu follows the disclosure pattern, items being buttons and links reached with Tab, never an ARIA menu.
-
border-width from default
{stroke-width.sm}Details
- Value
-
0.6px - CSS
--dropdown-menu-border-width- Token
dropdown.menu.border-width- Decisions
-
border-radius from default
{corner-radius.sm}Details
- Value
-
8px - CSS
--dropdown-menu-border-radius- Token
dropdown.menu.border-radius- Decisions
-
padding from default
{space.8}Details
- Value
-
8px - CSS
--dropdown-menu-padding- Token
dropdown.menu.padding- Decisions
-
offset from default
{space.4}Details
- Value
-
4px - CSS
--dropdown-menu-offset- Token
dropdown.menu.offset- Decisions
Part group
Not rendered in this configuration.
No tokens of its own: it inherits from its parent.
Part item
Not rendered in this configuration.
-
background
neutral.defaultfrom default{color.transparent}Details
- Value
-
color(srgb 0 0 0 / 0) - CSS
--dropdown-item-background-neutral-default- Token
dropdown.item.background.neutral.default- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
neutral.hoverfrom default{global.bg.subtle.neutral.default}Details
- Value
-
#B6B4B41adark:#7676761a - CSS
--dropdown-item-background-neutral-hover- Token
dropdown.item.background.neutral.hover- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
neutral.activefrom default{global.bg.subtle.neutral.hover}Details
- Value
-
#B6B4B426dark:#7676764d - CSS
--dropdown-item-background-neutral-active- Token
dropdown.item.background.neutral.active- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
error.defaultfrom default{color.transparent}Details
- Value
-
color(srgb 0 0 0 / 0) - CSS
--dropdown-item-background-error-default- Token
dropdown.item.background.error.default- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
error.hoverfrom default{global.bg.subtle.functional.error.default}Details
- Resolves through
functional.error.50 raw- Value
-
#FEECEAdark:#2B0B08 - CSS
--dropdown-item-background-error-hover- Token
dropdown.item.background.error.hover- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
error.activefrom default{global.bg.subtle.functional.error.hover}Details
- Resolves through
functional.error.100 raw- Value
-
#FCCDC6dark:#3E130F - CSS
--dropdown-item-background-error-active- Token
dropdown.item.background.error.active- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
background
disabledfrom default{color.transparent}Details
- Value
-
color(srgb 0 0 0 / 0) - CSS
--dropdown-item-background-disabled- Token
dropdown.item.background.disabled- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
min-height from default
{space.32}Details
- Value
-
32px - CSS
--dropdown-item-min-height- Token
dropdown.item.min-height- Decisions
-
padding-inline from default
{space.8}Details
- Value
-
8px - CSS
--dropdown-item-padding-inline- Token
dropdown.item.padding-inline- Decisions
-
gap from default
{space.8}Details
- Value
-
8px - CSS
--dropdown-item-gap- Token
dropdown.item.gap- Decisions
-
border-radius from default
{corner-radius.2xs}Details
- Value
-
2px - CSS
--dropdown-item-border-radius- Token
dropdown.item.border-radius- Decisions
-
outline-width
focus-visiblefrom default{focus.ring.width}Details
- Resolves through
stroke-width.lg semantic- Value
-
2.4px - CSS
--dropdown-item-outline-width-focus-visible- Token
dropdown.item.outline-width.focus-visible- Decisions
-
outline-offset
focus-visiblefrom default{focus.ring.offset}Details
- Resolves through
space.4 semantic- Value
-
4px - CSS
--dropdown-item-outline-offset-focus-visible- Token
dropdown.item.outline-offset.focus-visible- Decisions
-
outline-color
focus-visiblefrom default{color.focus.ring}Details
- Resolves through
brand.light.600 raw- Value
-
#175DD6dark:#9EE7FA - CSS
--dropdown-item-outline-color-focus-visible- Token
dropdown.item.outline-color.focus-visible- Decisions
-
transition.duration from default
{duration.fast}Details
- Value
-
150ms - CSS
--dropdown-item-transition-duration- Token
dropdown.item.transition.duration- Decisions
-
transition.easing from default
{easing.standard}Details
- Value
-
cubic-bezier(0.2, 0, 0, 1) - CSS
--dropdown-item-transition-easing- Token
dropdown.item.transition.easing- Decisions
Part item-icon
Not rendered in this configuration.
-
font-family from default
{font.icon.family}Details
- Value
-
"Material Symbols Outlined" - CSS
--dropdown-item-icon-font-family- Token
dropdown.item-icon.font-family- Decisions
-
font-weight from default
{font.icon.weight.light}Details
- Value
-
300 - CSS
--dropdown-item-icon-font-weight- Token
dropdown.item-icon.font-weight- Decisions
-
fill from default
{font.icon.fill.off}Details
- Value
-
0 - CSS
--dropdown-item-icon-fill- Token
dropdown.item-icon.fill- Decisions
-
grade from default
{font.icon.grade.normal}Details
- Value
-
0 - CSS
--dropdown-item-icon-grade- Token
dropdown.item-icon.grade- Decisions
-
optical-size from default
{font.icon.optical-size.20}Details
- Value
-
20 - CSS
--dropdown-item-icon-optical-size- Token
dropdown.item-icon.optical-size- Decisions
-
size from default
{size.2}Details
- Value
-
16px - CSS
--dropdown-item-icon-size- Token
dropdown.item-icon.size- Decisions
Part item-label
Not rendered in this configuration.
-
color
neutral.defaultfrom default{global.text.on-subtle.neutral.default}Details
- Resolves through
global.text.on-base.neutral.secondary semanticlight-switch.base.800 rawneutral.light.ash.800 raw- Value
-
#323031dark:#E3DDDE - CSS
--dropdown-item-label-color-neutral-default- Token
dropdown.item-label.color.neutral.default- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
neutral.hoverfrom default{global.text.on-subtle.neutral.default}Details
- Resolves through
global.text.on-base.neutral.secondary semanticlight-switch.base.800 rawneutral.light.ash.800 raw- Value
-
#323031dark:#E3DDDE - CSS
--dropdown-item-label-color-neutral-hover- Token
dropdown.item-label.color.neutral.hover- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
neutral.activefrom default{global.text.on-subtle.neutral.default}Details
- Resolves through
global.text.on-base.neutral.secondary semanticlight-switch.base.800 rawneutral.light.ash.800 raw- Value
-
#323031dark:#E3DDDE - CSS
--dropdown-item-label-color-neutral-active- Token
dropdown.item-label.color.neutral.active- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
error.defaultfrom default{global.text.on-subtle.functional.error.default}Details
- Resolves through
functional.error.600 raw- Value
-
#C01619dark:#FAA79D - CSS
--dropdown-item-label-color-error-default- Token
dropdown.item-label.color.error.default- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
error.hoverfrom default{global.text.on-subtle.functional.error.default}Details
- Resolves through
functional.error.600 raw- Value
-
#C01619dark:#FAA79D - CSS
--dropdown-item-label-color-error-hover- Token
dropdown.item-label.color.error.hover- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
error.activefrom default{global.text.on-subtle.functional.error.default}Details
- Resolves through
functional.error.600 raw- Value
-
#C01619dark:#FAA79D - CSS
--dropdown-item-label-color-error-active- Token
dropdown.item-label.color.error.active- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
color
disabledfrom default{global.text.state.disabled.default}Details
- Resolves through
light-switch.base.500 rawneutral.light.ash.500 raw- Value
-
#8C8C8Cdark:#9D9B9Cb2 - CSS
--dropdown-item-label-color-disabled- Token
dropdown.item-label.color.disabled- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
typography from default
Details
- Value
-
Inter [object Object]/1.2 500 [object Object] - CSS
--dropdown-item-label-typography-font-family- Token
dropdown.item-label.typography- Decisions
Part separator
Not rendered in this configuration.
-
color from default
{global.border.level.on-level.2}Details
- Resolves through
light-switch.base.100 rawneutral.light.ash.100 raw- Value
-
#ECE8E9dark:#767676 - CSS
--dropdown-separator-color- Token
dropdown.separator.color- Decisions
-
- The menu is a level 2 surface wherever it opens: its background is global.bg.level.2.default, its outline global.border.level.edge.level.2 and its separators global.border.level.on-level.2. Items alias the Figma library's mapped roles as they are (neutral and functional.error families, subtle tints on hover and press), in light and dark mode.
- Menu items can have a leading icon, can be disabled, and can take the error intent for destructive actions; separators split the menu into groups of items.
-
width from default
{stroke-width.sm}Details
- Value
-
0.6px - CSS
--dropdown-separator-width- Token
dropdown.separator.width- Decisions
-
margin-block from default
{space.4}Details
- Value
-
4px - CSS
--dropdown-separator-margin-block- Token
dropdown.separator.margin-block- Decisions
<div class="ds-dropdown">
<button
type="button"
class="ds-button ds-dropdown__trigger"
data-emphasis="accent"
data-intent="neutral"
data-size="medium"
data-part="trigger"
id="ds-dropdown-78-trigger"
popovertarget="ds-dropdown-78"
>
<span class="ds-button__label" data-part="label">Actions</span>
<span
class="ds-button__icon"
data-part="icon"
data-position="end"
aria-hidden="true"
>expand_more</span>
</button>
<div
class="ds-dropdown__menu"
data-part="menu"
id="ds-dropdown-78"
popover
aria-labelledby="ds-dropdown-78-trigger"
>
<ul class="ds-dropdown__group" data-part="group">
<li>
<button
type="button"
class="ds-dropdown__item"
data-part="item"
data-intent="neutral"
popovertarget="ds-dropdown-78"
popovertargetaction="hide"
>
<span
class="ds-dropdown__item-icon"
data-part="item-icon"
aria-hidden="true"
>content_copy</span>
<span
class="ds-dropdown__item-label"
data-part="item-label"
>Duplicate</span>
</button>
</li>
<li>
<button
type="button"
class="ds-dropdown__item"
data-part="item"
data-intent="neutral"
popovertarget="ds-dropdown-78"
popovertargetaction="hide"
>
<span
class="ds-dropdown__item-icon"
data-part="item-icon"
aria-hidden="true"
>edit</span>
<span
class="ds-dropdown__item-label"
data-part="item-label"
>Rename</span>
</button>
</li>
<li>
<button
type="button"
class="ds-dropdown__item"
data-part="item"
data-intent="neutral"
popovertarget="ds-dropdown-78"
popovertargetaction="hide"
>
<span
class="ds-dropdown__item-icon"
data-part="item-icon"
aria-hidden="true"
>download</span>
<span
class="ds-dropdown__item-label"
data-part="item-label"
>Download</span>
</button>
</li>
</ul>
<hr class="ds-dropdown__separator" data-part="separator">
<ul class="ds-dropdown__group" data-part="group">
<li>
<button
type="button"
class="ds-dropdown__item"
data-part="item"
data-intent="error"
popovertarget="ds-dropdown-78"
popovertargetaction="hide"
>
<span
class="ds-dropdown__item-icon"
data-part="item-icon"
aria-hidden="true"
>delete</span>
<span
class="ds-dropdown__item-label"
data-part="item-label"
>Delete project</span>
</button>
</li>
</ul>
</div>
</div>