Etch component

Menu Dropdown 1

Menu Dropdown 1

Copy Menu Dropdown 1

Configurator settings

Change a setting in the configurator to include it.

Optional. Copies the component under its own name, such as News Card Alpha for a site.

Documentation

A dropdown for MAC Menu 1: a button that opens a panel of links or a mega menu. It opens the way the menu sets: on desktop as a dropdown or a morphing panel, and up to 992px wide as an accordion or a stacked panel with a back button.

How to use it

  • Set Dropdown Label, the button's text, and fill the dropdownContent slot with MAC Menu Link 1s, or with mega menu content (Content, below).
  • Content: Links, a list, or Mega Menu, for content such as MAC Dropdown 1 to 6.
  • Width: as wide as its content, or as the header's box, for a full-width mega menu.
  • Activation Method: As the Menu (the menu's own setting), Hover and Click, or Click.
  • Hide at Menu Breakpoint hides it on desktop or up to 992px wide, for a dropdown only one of them needs.

Good to know

  • It works only inside MAC Menu 1.
  • A stacked panel's back button reads "Main Menu" and is named "Back to Main Menu" for screen readers. In a nested dropdown its name follows the parent's label, such as "Back to Services Menu". These texts are in the component's markup, so edit them there, once for the site.
  • The CSS variables set the panel's background, border, radius, shadow, padding and animation.
  • Its states are attributes: data-dropdown-mode on the dropdown (dropdown, morph, accordion or stacked), data-open="true" on the dropdown and its panel while it's open, and aria-expanded on its button. A morph panel has data-morph-panel="true", a stacked one data-stacked="true", and the panel's side is in data-position-inline and data-position-block.
  • When it holds the link to the current page, MAC Menu 1 marks its button with data-has-current="true" and gives it the current link's look. In Windows contrast themes the button is underlined, and in Dropdown mode the panel has a line around it, since those themes drop its shadow.

Reference

Read from the component's JSON, so it's always current.

Loading the reference