October 2017
Intermediate to advanced
370 pages
8h 57m
English
Sidebar or off-screen navigation is well suited to small screen devices. Generally, a navigation menu is hidden off to one side of the screen. The menu is revealed by clicking a button, and often it slides in from the side.
Sidebar navigation is supported out-of-the-box in AMP via the amp-sidebar component. This is an extended component, so it must be explicitly included with the following code:
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
Let's add a sidebar menu to our article example page. There are a few things to note about amp-sidebar before we use it:
Read now
Unlock full access