2.14.0
Mastheads provide a shared foundation for Morningstar web properties by presenting branding and key functionality in a set of standard responsive configurations.
See the Navigation pattern for more information.
Mastheads consist of one required and two optional elements:
Use to establish the foundation of a product masthead.
<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-Product-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
</div>
</div>
</header>
Use to contain, at most, a Flat Button to trigger a hidden menu and a Search Field.
<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide mds-page-shell--show-off-canvas-navigation" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#menu-padless">
</use>
</svg>
</button>
<button class="mds-button mds-button--flat mds-button--flat-icon-m mds-masthead--show-wide mds-page-shell--show-off-canvas-navigation" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#menu-padless">
</use>
</svg>
<span class="mds-button__text">
Menu
</span>
</button>
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#search-padless">
</use>
</svg>
</button>
<div class="mds-search-field mds-masthead--show-wide" role="search">
<input type="text" class="mds-search-field__input" aria-label="Search" placeholder="Search...">
<svg class="mds-icon mds-search-field__search-icon" aria-hidden="true">
<use xlink:href="/icons/mds.svg#search--s">
</use>
</svg>
<span class="mds-search-field__input-focus-outline"></span>
</div>
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-Product-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
</div>
</div>
</header>
menu-padless
icon.Use to contain, at most, one call to action and a sign in functionality.
<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-Product-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#envelope">
</use>
</svg>
</button>
<button class="mds-button mds-button--primary mds-masthead--show-wide" type="button">
Contact Us
</button>
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#person-padless">
</use>
</svg>
</button>
<button class="mds-button mds-button--flat mds-button--flat-icon-m mds-masthead--show-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#person-padless">
</use>
</svg>
<span class="mds-button__text">
Sign In
</span>
</button>
</div>
</div>
</header>
person-padless
icon.<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-Product-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#envelope">
</use>
</svg>
</button>
<button class="mds-button mds-button--primary mds-masthead--show-wide" type="button">
Contact Us
</button>
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#person-padless">
</use>
</svg>
</button>
<button class="mds-button mds-button--flat mds-button--flat-icon-m mds-masthead--show-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#person-padless">
</use>
</svg>
<span class="mds-button__text">
My Account
</span>
</button>
</div>
</div>
</header>
caret-down--s
icon to the right of “My Account” if the button triggers a Menu.<header class="mds-masthead mds-masthead--tall">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-logo-70px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
</div>
</div>
</header>
Responsive states are triggered at viewports 768px
wide and below.
<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
</div>
</div>
</header>
<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide mds-page-shell--show-off-canvas-navigation" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#menu-padless">
</use>
</svg>
</button>
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#search-padless">
</use>
</svg>
</button>
<div class="mds-search-field mds-masthead--show-wide" role="search">
<input type="text" class="mds-search-field__input" aria-label="Search" placeholder="Search...">
<svg class="mds-icon mds-search-field__search-icon" aria-hidden="true">
<use xlink:href="/icons/mds.svg#search--s">
</use>
</svg>
<span class="mds-search-field__input-focus-outline"></span>
</div>
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
</div>
</div>
</header>
768px
and below, reduce menu Flat Button to use the menu-padless
Icon-Only Button.768px
and below, reduce Search field to use the search-padless
Icon-Only Button.<header class="mds-masthead">
<div class="mds-masthead__inner">
<div class="mds-masthead__left">
</div>
<div class="mds-masthead__logo-wrap">
<img class="mds-masthead__logo--wide" src="/images/components/mastheads/logos/Mstar-Product-logo-50px.svg" alt="Product Name">
<img class="mds-masthead__logo" src="/images/components/mastheads/logos/Mstar-logo-50px.svg" alt="Product Name">
</div>
<div class="mds-masthead__right">
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#envelope">
</use>
</svg>
</button>
<button class="mds-button mds-button--icon-only mds-masthead--hide-wide" type="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left" aria-hidden="true">
<use xlink:href="/icons/mds.svg#person-padless">
</use>
</svg>
</button>
<button class="mds-button mds-button--primary mds-masthead--show-wide" type="button">
Contact Us
</button>
<button class="mds-button mds-button--secondary mds-masthead--show-wide" type="button">
Sign In
</button>
</div>
</div>
</header>
person-padless
Icon-Only Button regardless of sign-in status.768px
and below, reduce the call to action to an Icon-Only Button.The Morningstar Design System uses the default masthead with no left or right controls. At the 768px
breakpoint, the masthead switches to the responsive variation, left controls are added, consisting of a Flat Button that will trigger the Site Navigation hidden menu.
Morningstar Credit Ratings uses the default masthead with a persistent hidden menu Flat Button and Primary Search Field in the left controls, and a sign in Flat Button in the right controls. The masthead switches to the responsive variation at the 768px
breakpoint.
Morningstar.com uses the tall masthead with a Primary Search Field in the left controls, and call to action and sign in Buttons in the right controls. At the 768px
breakpoint, the masthead switches to the responsive variation, and a Icon Only Button is added to the left controls that will trigger the Site Navigation hidden menu.
<iframe>
. A masthead should always be at the top-most level of your site or app structure.768px
and below.<header>
element for the top level wrapper of masthead as shown in the code examples.
Class
|
Applies to
|
Outcome
|
---|---|---|
|
|
Uses a taller-than-default size at the widest breakpoint. |
|
|
By default, |
|
Any element within |
Hides elements with this class for viewports 768px wide or greater. |
|
Any element within |
Shows elements with this class for viewports 768px wide or greater. |
|
Any element within |
Hides elements with this class for viewports 1024px wide or greater. |
|
Any element within |
Shows elements with this class for viewports 1024px wide or greater. |