apm install amp-snippets
Snippets for creating AMP HTML pages.
amp-html provides the necessary boilerplate to get going with AMP.
The extended snippets require you to include a corresponding
<script> tag in the header. These snippets end with the
-script suffix. As an example, the mustache snippet (
amp-mustache) is used with the corresponding
| Snippet | Description | | :————- | :————- | | amp-accordion | An accordion provides a way for viewers to glance at the content outline and jump to any section. | | amp-ad | A container to display an ad. | | amp-anim | A runtime-managed animated image, typically a GIF. | | amp-audio | A replacement for the HTML5 audio tag. | | amp-carousel | A generic carousel for displaying multiple similar pieces of content along a horizontal axis. | | amp-facebook | Displays a Facebook Post. | | amp-facebook-video | Displays a Facebook Video. | | amp-fit-text | Expands or shrinks its font size to fit the content within the space given to it. | | amp-html | Boilerplate for a basic AMP HTML page. | | amp-iframe | Displays an iframe. | | amp-image-lightbox | Allows for a “image lightbox”. | | amp-instagram | Displays an instagram embed. | | amp-install-serviceworker | Installs a ServiceWorker for the current page. | | amp-lightbox | Allows for a “lightbox” or similar experience where upon user interaction, a component expands to fill the viewport until it is closed again by the user. | | amp-list | Fetches dynamic content from a CORS JSON endpoint and renders it using a supplied template. | | amp-mustache | Allows rendering of Mustache.js. | | amp-pixel | The amp-pixel element is meant to be used as a typical tracking pixel - to count page views. | | amp-soundcloud | Displays a Soundcloud clip. | | amp-video | A replacement for the HTML5 video tag. | | amp-youtube | Displays a YouTube video. |
Not all tags are included, and some of the snippets may contain bugs. Pull requests welcome :)