AMP Extensions are either extended components or extended templates.
Extended components must be explicitly included into the document as custom elements.
For example, to include a youtube video in your page
include the following script in the <head>
:
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
Current list of extended components:
Component | Description |
---|---|
amp-anim |
Runtime-managed animated image, most typically a GIF. |
amp-audio |
Replacement for the HTML5 audio tag. |
amp-brightcove |
Displays a Brightcove Video Cloud or Perform player. |
amp-carousel |
Generic carousel for displaying multiple similar pieces of content along a horizontal axis. |
amp-fit-text |
Expand or shrink font size to fit the content within the space given. |
amp-font |
Trigger and monitor the loading of custom fonts. |
amp-iframe |
Displays an iframe. |
amp-image-lightbox |
Allows for a “image lightbox” or similar experience. |
amp-instagram |
Displays an instagram embed. |
amp-install-serviceworker |
Installs a ServiceWorker. |
amp-lightbox |
Allows for a “lightbox” or similar experience. |
amp-list |
A dynamic list that can download data and create list items using a template |
amp-twitter |
Displays a Twitter Tweet. |
amp-vine |
Displays a Vine simple embed. |
amp-youtube |
Displays a Youtube video. |
NOT LAUNCHED YET
Extended templates must be explicitly included into the document as custom templates.
For example, to include a amp-mustache template in your page
include the following script in the <head>
:
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>
Current list of extended templates:
Component | Description |
---|---|
amp-mustache |
Mustache template. |