Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Menu dropdown

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsagerh-menu-dropdownImportingUsagerh-menu-dropdown

Importing

Add rh-menu-dropdown to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-menu-dropdown/rh-menu-dropdown.js';
</script>
Copy to Clipboard Wrap lines

To learn more about installing RHDS elements on your site using an import map read our getting started docs.

Usage

<div id="menu-dropdown-container">
  <rh-menu-dropdown>
    <span slot="toggle-label">Basic toggle</span>
    <rh-menu-item>Action one</rh-menu-item>
    <rh-menu-item>Action two</rh-menu-item>
    <rh-menu-item>Action three</rh-menu-item>
    <rh-menu-item disabled>Disabled Action</rh-menu-item>
    <hr/>
    <rh-menu-item>Separated action</rh-menu-item>
  </rh-menu-dropdown>
</div>

<script type="module">
  import '@rhds/elements/rh-menu-dropdown/rh-menu-dropdown.js';
  import '@rhds/elements/rh-menu/rh-menu-item.js';

  const dropdown = document.querySelector('rh-menu-dropdown');
  dropdown.addEventListener('select', e => {
    console.log('Selected:', e.text);
  });
</script>

<style>
#menu-dropdown-container {
  padding: 1rem;

  rh-menu-dropdown {
    width: 296px;
  }
}
</style>
Copy to Clipboard Wrap lines

rh-menu-dropdown

A menu dropdown presents a list of actions or links in a vertically stacked menu, appearing when a user interacts with a toggle button.

Slots 2
Slot Name Summary Description
toggle-label

Use this slot for the toggle label. Keep toggle labels short and succinct.

[default]

Use this slot to provide the menu content. Use the "rh-menu" component for the menu panel, and use "rh-menu-items" to define the individual menu items. To organize menu items into groups, use the "rh-menu-item-group" component.
Note: [default] unnamed slots do not have a slot="name" attribute.

Attributes 5
Attribute DOM Property Description Type Default
open open

whether the dropdown is currently open.

boolean
false
variant variant

Defines the visual style of the dropdown. Setting it to 'borderless' removes the default border styling.

'borderless'
unknown
layout layout

The 'compact' layout reduces spacing and add the rh-icon ellipsis-vertical-fill.

'compact'
unknown
disabled disabled

Disables user interaction with the dropdown. When true, the dropdown cannot be opened or interacted with, and appears visually disabled.

boolean
false
accessible-label accessibleLabel

Provides an accessible name for the dropdown's trigger, improving screen reader support. This label is announced to assistive technologies to describe the purpose of the compact menu dropdown.

string
'Toggle menu'
Methods 2
Method Name Description
firstUpdated()
focus()

Moves focus to the currently active (focused) item.

Events 0
None
CSS Shadow Parts 0
None
CSS Custom Properties 0
None
Design Tokens 22
Token Summary Copy
--rh-border-width-sm
Full CSS Variable Permalink to this token
--rh-color-text-primary
Full CSS Variable Permalink to this token
--rh-box-shadow-md
Full CSS Variable Permalink to this token
--rh-color-accent-base-on-light
Full CSS Variable Permalink to this token
--rh-color-accent-base-on-dark
Full CSS Variable Permalink to this token
--rh-font-family-body-text
Full CSS Variable Permalink to this token
--rh-font-size-body-text-md
Full CSS Variable Permalink to this token
--rh-font-weight-body-text-regular
Full CSS Variable Permalink to this token
--rh-line-height-code
Full CSS Variable Permalink to this token
--rh-space-sm
Full CSS Variable Permalink to this token
--rh-space-lg
Full CSS Variable Permalink to this token
--rh-border-radius-default
Full CSS Variable Permalink to this token
--rh-color-surface-lightest
Full CSS Variable Permalink to this token
--rh-color-surface-darkest
Full CSS Variable Permalink to this token
--rh-color-surface-lighter
Full CSS Variable Permalink to this token
--rh-color-surface-darker
Full CSS Variable Permalink to this token
--rh-length-3xs
Full CSS Variable Permalink to this token
--rh-color-gray-30
Full CSS Variable Permalink to this token
--rh-color-gray-40
Full CSS Variable Permalink to this token
--rh-space-md
Full CSS Variable Permalink to this token
--rh-color-gray-50
Full CSS Variable Permalink to this token
--rh-color-gray-60
Full CSS Variable Permalink to this token
© 2025 Red Hat Deploys by Netlify