Dropdown menu displays a list of actions or selectable options for a user. Dropdown uses popout component internally to create the overlay functionality.
<nord-stackdirection="horizontal"justify-content="center"><nord-dropdownsize="s"><nord-buttonsize="s"variant="plain"slot="toggle"><nord-badgevariant="success"class="toggle"><nord-iconname="interface-checked-small"></nord-icon> Discharged</nord-badge></nord-button><nord-dropdown-itemhref="#">Waiting for consultation</nord-dropdown-item><nord-dropdown-item>Consultation</nord-dropdown-item><nord-dropdown-item>Arrived</nord-dropdown-item><nord-dropdown-item>Upcoming</nord-dropdown-item><nord-dropdown-item>Cancelled</nord-dropdown-item></nord-dropdown></nord-stack>
<nord-navigationstyle="max-inline-size: 250px"><nord-dropdownslot="header"expand><nord-buttonslot="toggle"expand><nord-avatarslot="start"name="Bath Clinic"variant="square">B</nord-avatar> Bath Clinic</nord-button><nord-dropdown-groupheading="laura.williams@nordhealth.com"><nord-dropdown-item><nord-avatarslot="start"name="Bath Clinic"size="s"variant="square">B</nord-avatar> Bath Clinic<nord-iconslot="end"name="interface-checked"></nord-icon></nord-dropdown-item><nord-dropdown-item><nord-avatarslot="start"name="Ocean Beach Clinic"size="s"variant="square"style="--n-avatar-color:var(--n-color-status-success)"> O</nord-avatar> Ocean Beach Clinic</nord-dropdown-item><nord-dropdown-item><nord-avatarslot="start"name="Park Animal Hospital"size="s"variant="square"style="--n-avatar-color:var(--n-color-status-highlight)"> P</nord-avatar> Park Animal Hospital</nord-dropdown-item><nord-dropdown-item><nord-avatarslot="start"name="Balboa Pet Hospital"size="s"variant="square"style="--n-avatar-color:var(--n-color-status-danger)"> B</nord-avatar> Balboa Pet Hospital</nord-dropdown-item></nord-dropdown-group><nord-dropdown-group><nord-dropdown-item>Add another clinic</nord-dropdown-item><nord-dropdown-item>Customize style</nord-dropdown-item></nord-dropdown-group><nord-dropdown-item>Sign out from all clinics</nord-dropdown-item></nord-dropdown></nord-navigation>
<nord-stackdirection="horizontal"justify-content="center"style="margin-bottom:calc(var(--n-space-xxl) * 4)"><nord-dropdown><nord-buttonsize="s"slot="toggle"><nord-visually-hidden>Menu</nord-visually-hidden><nord-iconsize="s"name="interface-menu-small"></nord-icon></nord-button><nord-dropdown-groupheading="Account"><nord-dropdown-itemhref="#"><nord-iconslot="start"name="user-single"></nord-icon> View profile<nord-iconslot="end"name="interface-checked"></nord-icon></nord-dropdown-item><nord-dropdown-item><nord-iconslot="start"name="navigation-settings"></nord-icon> Settings</nord-dropdown-item></nord-dropdown-group><nord-dropdown-group><nord-dropdown-item><nord-iconslot="start"name="generic-keyboard"></nord-icon> Show keyboard shortcuts</nord-dropdown-item><nord-dropdown-item><nord-iconslot="start"name="interface-help"></nord-icon> Help & Support</nord-dropdown-item><nord-dropdown-item><nord-iconslot="start"name="file-script"></nord-icon> API</nord-dropdown-item></nord-dropdown-group><nord-dropdown-item> Sign out<nord-iconslot="end"name="interface-logout"></nord-icon></nord-dropdown-item></nord-dropdown></nord-stack>
<nord-stackdirection="horizontal"justify-content="center"style="margin-bottom:calc(var(--n-space-xxl) * 3)"><nord-dropdown><nord-buttonslot="toggle">Laura Williams</nord-button><nord-avatarslot="header"size="s"name="Laura Williams"></nord-avatar><pslot="header"class="n-color-text-weak n-font-size-s"> Signed in as <spanclass="n-font-weight-active">Laura Williams</span></p><nord-dropdown-group><nord-dropdown-item>My profile</nord-dropdown-item><nord-dropdown-item>Account Settings</nord-dropdown-item><nord-dropdown-item>Change password</nord-dropdown-item></nord-dropdown-group><nord-dropdown-group><nord-dropdown-item> Keyboard commands<divslot="end"class="n-color-text-weaker n-font-size-xs">Cmd+K</div></nord-dropdown-item><nord-dropdown-item>Help & Support</nord-dropdown-item></nord-dropdown-group><nord-dropdown-group><nord-dropdown-item>Sign out <nord-iconslot="end"name="interface-logout"></nord-icon></nord-dropdown-item></nord-dropdown-group></nord-dropdown></nord-stack>
<nord-stackdirection="horizontal"justify-content="center"style="margin-bottom:calc(var(--n-space-xxl) * 3)"><nord-dropdown><nord-buttonslot="toggle">Notifications (7)</nord-button><h2slot="header"class="n-typescale-l"> Notifications <spanclass="n-font-weight n-color-text-weaker">(7)</span></h2><nord-buttonslot="header-end"size="s"autofocus>Mark all as read</nord-button><nord-messageunreadhighlight> Ariel Salminen arrived to clinic with Pixie cat.<spanslot="footer">Just now at Nord Clinic</span></nord-message><nord-messageunread> New feature available! We’ve introduced a quick way to navigate between app views, actions, and more using a new command menu.<spanslot="footer">12 minutes ago</span></nord-message><nord-messageunread> Nina Hallikainen arrived to clinic with Durante dog.<spanslot="footer">20 minutes ago at Nord Clinic</span></nord-message><nord-messageunread> David Darnes arrived to clinic with Norfryd cat.<spanslot="footer">2 hours ago at Nord Clinic</span></nord-message><nord-messageunread> Nick Williams arrived to clinic with Moog cat.<spanslot="footer">2 hours ago at Nord Clinic</span></nord-message><nord-messageunread> Eric Habich arrived to clinic with Zero cat.<spanslot="footer">4 hours ago at Nord Clinic</span></nord-message><nord-messageunread> Elvin van Eede arrived to clinic with Amoeba cat.<spanslot="footer">12 hours ago at Nord Clinic</span></nord-message><nord-dropdown-item> See all notifications<nord-iconslot="end"name="arrow-right-long"></nord-icon></nord-dropdown-item></nord-dropdown></nord-stack>
Properties
Property
Attribute
Description
Type
Default
expand
expand
Controls whether the toggle slot expands to fill the width of its container.
boolean
false
size
size
The size of the dropdown. This affects the minimum and maximum inline-size of the dropdown.
"s" | "m" | "l"
"m"
open
open
Controls whether the component is open or not.
boolean
false
align
align
Set the alignment in relation to the toggle (or anchor) depending on the position. start will align it to the left of the toggle (or anchor). end will align it to the right of the toggle (or anchor). Setting the position to inline-start or inline-end will switch start and end to the top and bottom respectively.
"start" | "end"
"start"
position
position
Set the position in relation to the toggle (or anchor). 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.
moveFocusToButton: A boolean option to move the focus to the original button that opens the dropdown.
Hide the dropdown programmatically. This method delegates to the Dropdown's internal Popout component. See Popout's hide() method for more details.
show() => Promise<TransitionEvent | void>
N/A
Show the dropdown programmatically. This method delegates to the Dropdown's internal Popout component. See Popout's show() method for more details.
CSS Properties
CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.
Property
Description
Default
--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
Dependencies
This component is internally dependent on the following components:
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.
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
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.