Active theme set to LightDarkLight high contrastDark high contrast and saved in preferences.
Copied to clipboard.
Error submitting your feedback! Please try again.
We’re hiring frontend developers! View open positions.

DropdownReady

Dropdown menu displays a list of actions or selectable options for a user. Dropdown uses popout component internally to create the overlay functionality.

Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
View RTL
<nord-stack direction="horizontal" justify-content="center" style="margin-bottom: calc(var(--n-space-xxl) * 3)">
<nord-dropdown size="s">
<nord-button slot="toggle">
Menu
<nord-icon slot="end" size="s" name="interface-dropdown-small"></nord-icon>
</nord-button>
<nord-dropdown-item href="#">View profile</nord-dropdown-item>
<nord-dropdown-item>Settings</nord-dropdown-item>
<nord-dropdown-item>Show keyboard shortcuts</nord-dropdown-item>
<nord-dropdown-item>Help & Support</nord-dropdown-item>
<nord-dropdown-item>API</nord-dropdown-item>
<nord-dropdown-item>Sign out</nord-dropdown-item>
</nord-dropdown>
</nord-stack>

Properties

PropertyAttributeDescriptionTypeDefault
openopen

Controls whether the dropdown is open or not.

booleanfalse
alignalign

Set the alignment of the dropdown in relation to the toggle depending on the position. start will align the left of the dropdown to the left of the toggle. end will align the right of the dropdown to the right of the toggle. A dropdown with a set position of inline-start or inline-end will switch start and end to the top and bottom of the dropdown respectively.

Popout["align"] | undefinedundefined
positionposition

Set the position of the dropdown in relation to the toggle. Options follow logical properties. block-start and block-end referring to top and bottom respectively, inline-start and inline-end referring to left and right respectively.

Popout["position"] | undefinedundefined
expandexpand

Controls whether the toggle slot expands to fill the width of its container.

booleanfalse
sizesize

The size of the dropdown. This affects the minimum and maximum inline-size of the dropdown.

"s" | "m" | "l""m"

Slots

Slot nameDescription
Default slotThe dropdown content.
toggleUsed to place the toggle for dropdown.

Methods

Method nameParametersDescription
hide(moveFocusToButton?: boolean) => voidmoveFocusToButton:
show() => voidN/A

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-dropdown-size

Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content.

250px

Usage #

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do #

  • Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or commands, where an action is initiated based on the selection.
  • When organizing dropdown menu items, sort the list in a logical order by putting the most selected option at the top.
  • Use for a “more” menu, where the control contains an icon.
  • Use for user profiles, where the control is an avatar.
  • Use in conjunction with the dropdown item and dropdown group components.

Don’t #


Content guidelines #

Dropdown items should be always written in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):

Create user
Create User

Dropdown items should always lead with a strong verb that encourages action. Use the {verb}+{noun} format except in the case of common actions like Save, Close or Cancel:

Edit row
Editing options

Avoid unnecessary words and articles in dropdown items, such as “the”, “an” or “a”:

Change theme
Change the theme

Avoid ending dropdown items in punctuation:

Switch user
Switch user.

Avoid all caps for dropdown items:

Rename
RENAME

Keep dropdown items to a single line of text:

Change theme
Change the theme
of the veterinary application.

Integration

For integration guidelines, please see Web Components documentation. This documentation explains how to implement and use Nord Web Components across different technologies such as Vue.js, React, or Vanilla JavaScript.

Integration Guidelines

Localization

Nord provides a lightweight solution for localizing its components. Not all components need localizing, as for the most part snippets of text are set per instance. For full localization guidelines, please see Localization documentation.

Localization Guidelines

Troubleshooting

If you experience any issues while using Nord Web Components, please head over to the Support page for more guidelines and ways to contact us.


Was this page helpful?

YesNo
Send feedback

We use this feedback to improve our documentation.