2.17.0
Page shells are prebuilt, responsive page containers.
See the Navigation pattern for more information.
Use to present a Masthead, horizontal Site Navigation – including a responsive Hidden Menu – and site or application content.
<div class="mds-page-shell">
<div class="mds-page-shell__header">
<div class="mds-page-shell__header-inner">
<h1>Masthead / Site Navigation Go Here</h1>
</div>
</div>
<div class="mds-page-shell__site-navigation">
<div class="mds-page-shell__site-navigation-inner">
<h1>Hidden Menu Goes Here</h1>
</div>
</div>
<div class="mds-page-shell__content">
<h1>Page Content Goes Here</h1>
</div>
</div>
mds-page-shell__header--sticky
modifier class to .mds-page-shell__header
make the Masthead and Site Navigation stick to the top edge of the viewport.mds-page-shell__header--tall
modifier class to .mds-page-shell__header
when using a tall Masthead.At smaller viewports, Site Navigation is replaced by a Hidden Menu. Hidden Menus use the vertical Site Navigation style and are accessible via a menu button located in the Masthead Left Controls.
768px
and 1024px
breakpoint depending on the number of items and their label lengths in the Site Navigation.Use to present a Masthead, vertical Site Navigation –including a responsive Hidden Menu – and site or application content.
<div class="mds-page-shell mds-page-shell--on-canvas-vertical-navigation">
<div class="mds-page-shell__header mds-page-shell__header--sticky mds-page-shell__header--masthead-only">
<div class="mds-page-shell__header-inner">
<h1>Masthead / Site Navigation Go Here</h1>
</div>
</div>
<div class="mds-page-shell__site-navigation mds-page-shell__site-navigation--sticky">
<div class="mds-page-shell__site-navigation-inner">
<h1>Hidden Menu Goes Here</h1>
</div>
</div>
<div class="mds-page-shell__content">
<h1>Page Content Goes Here</h1>
</div>
</div>
768px
and below, Site Navigation is replaced by a Hidden Menu.Use to present just a Masthead.
<div class="mds-page-shell">
<div class="mds-page-shell__header">
<div class="mds-page-shell__header-inner">
<h1>Masthead Goes Here</h1>
</div>
</div>
<div class="mds-page-shell__site-navigation">
<div class="mds-page-shell__site-navigation-inner">
false
</div>
</div>
<div class="mds-page-shell__content">
<h1>Page Content Goes Here</h1>
</div>
</div>
mds-page-shell__header--sticky
and mds-page-shell__header--masthead-only
modifier classes on the .mds-page-shell__header
element to make the Masthead stick to the top edge of the viewport.Use to present a Masthead With a persistent Site Navigation Hidden Menu.
<div class="mds-page-shell mds-page-shell--off-canvas-navigation-always">
<div class="mds-page-shell__header">
<div class="mds-page-shell__header-inner">
<h1>Masthead / Site Navigation Go Here</h1>
</div>
</div>
<div class="mds-page-shell__site-navigation">
<div class="mds-page-shell__site-navigation-inner">
<h1>Hidden Menu Goes Here</h1>
</div>
</div>
<div class="mds-page-shell__content">
<h1>Page Content Goes Here</h1>
</div>
</div>
mds-page-shell__header--sticky
and mds-page-shell__header--masthead-only
modifier classes on the .mds-page-shell__header
element to make the Masthead stick to the top edge of the viewport.Uses a Horizontal Navigation Page Shell to present a tall Masthead and horizontal Site Navigation with sticky behavior.
Uses a Horizontal Navigation Page Shell to present a default Masthead with a persistent Hidden Menu and horizontal Site Navigation with sticky behavior.
Uses a Vertical Navigation Page Shell to present a Masthead and vertical Site Navigation.
Uses a Masthead-only page shell to present just a Masthead with sticky behavior.
Uses a Masthead-Only With (persistent) Hidden Menu page shell to present a Masthead with sticky behavior and a Site Navigation Hidden Menu.
mds-page-shell__header--sticky
modifier class on the .mds-page-shell__header
element to make the Masthead and Site Navigation stick to the top edge of the viewport.768px
and 1024px
breakpoint depending on the length and number of items in the Site Navigation.<body>
element when using Page Shell. Page Shell must fill the entire viewport to work properly.
Class
|
Applies to
|
Outcome
|
---|---|---|
|
|
Renders the |
|
|
Triggers the |
|
|
Allows the Hidden Menu functionality to work at |
|
|
Sticks the header at the top of the viewport as the rest of the page is scrolled. The header can contain a combination of Masthead and horizontal Site Navigation. |
|
|
Use when a sticky header contains only the Masthead. Ensures the page shell’s content renders just below the sticky header. |
|
|
Use when a sticky header contains the tall version of the Masthead. Ensures the page shell’s content renders just below the sticky header. |
|
|
Sticks the left column navigation directly below the header as the rest of the page is scrolled. Use to create the [Vertical Navigation]doc-vertical-navigation) variation. |