Etch component
Menu Link 1
Documentation
A link for MAC Menu 1 and its dropdowns, as a list item. It shows as a link or as a button, such as the header's call to action.
How to use it
- Set Label and Link URL. Open Link in New Tab opens it in a new tab, and screen readers then hear "(opens in a new tab)" after the label.
- Show As: Link, or Button, which takes ACSS's button classes from Style, Size and Outline, as MAC CTA 1 does. Their defaults give the header's button: Primary, M and no outline.
- Hide at Menu Breakpoint hides it on desktop or up to 992px wide. For a button on desktop and a plain link in the mobile menu, use two links, each hidden on the other side.
Good to know
- Its
lihasdata-show-as(linkorbutton), and the menu's link styles skip a button, which keeps ACSS's own. - The header's sample menu ends with a link shown as a button, its call to action.
- A link that opens in a new tab can show an arrow after its label: set
--mac-menu-link-1-new-tab-icon-displaytoflex, such as on:rootfor the whole site. It's hidden by default.--mac-menu-link-1-new-tab-icon-size(0.75em) and--mac-menu-link-1-new-tab-icon-gap(0.25em) set its size and its space after the label. The arrow is the hub's MAC Icon Line Link External, which the site needs at/wp-content/uploads/mac-icon-line-link-external.svg. - "(opens in a new tab)" is in the component's markup, so for a site in another language edit it there, once for the site.
Reference
Read from the component's JSON, so it's always current.
Loading the reference