Learn AMP by Example
A hands-on introduction to Accelerated Mobile Pages (AMP) focusing on code and live samples. Learn how to create AMP pages and see examples for all AMP components.Introduction
Get started with AMP and learn how to build your first AMP page.
How to publish AMPs
There are a few things you need to watch out for when publishing Accelerated Mobile Pages (AMP).
AMP for E-Commerce Getting Started
Here is a quick getting started guide for creating e-commerce webpages with AMP.
Components
AMP components in action. Learn how to build AMPs using the built-in components.
amp-access-laterpay
amp-access-laterpay allows publishers to easily integrate with the payment infrastructure platform LaterPay.
amp-access
The amp-access component adds support for paywalls and subscriptions to AMP, allowing the publisher to control which content is accessible by the reader and with what restrictions.
amp-accordion
An accordion provides a way for viewers to have a glance at the outline of the content and jump to a section or their choice at their will.
amp-app-banner
amp-app-banner provides a minimal UI for a cross-platform, fixed-position banner showing a call-to-action to install an app.
amp-bind
amp-bind allows you to add custom interactivity to your pages beyond using AMP's pre-built components.
amp-brightcove
The amp-brightcove component allows embedding a Brightcove Video Cloud or Perform player.
amp-call-tracking
amp-call-tracking replaces static phone numbers with dynamically generated phone numbers used for call tracking analytics.
amp-carousel
The amp-carousel component allows displaying multiple similar pieces of content along a horizontal axis.
amp-dynamic-css-classes
AMP's dynamic CSS classes provided by the amp-dynamic-css-class tag enable boolean logic for a handful of conditions
amp-experiment
The amp-experiment component allows to perform user experience experiments on an AMP document and collect resulting data.
amp-font
Learn how to use the amp-font component to trigger and monitor the loading of custom fonts on AMP pages.
amp-form
The amp-form extension allows the usage of forms and input fields in an AMP document.
amp-fx-flying-carpet
amp-fx-flying-carpet displays its children inside a container of fixed height.
amp-fx-parallax
The amp-fx-parallax extension allows an element to move as if it is nearer or farther relative to the foreground of the page content.
amp-gfycat
Use the amp-gfycat component to embed animated GIFs from gfycat in your AMP HTML files.
amp-google-vrview-image
The amp-google-vrview-image extension allows embedding 360 degree VR media into AMP pages.
amp-ima-video
amp-ima-video embeds a video player for instream video ads that are integrated with the IMA SDK.
amp-image-lightbox
The amp-image-lightbox component allows the user to expand an image to fill the viewport.
amp-install-serviceworker
The amp-install-serviceworker component enables service worker installation via same origin or via the Google AMP Cache.
amp-lightbox
The amp-lightbox component 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
The amp-list component fetches dynamic content from a CORS JSON endpoint and renders it using a supplied template.
amp-live-list
The amp-live-list component adds support for publishing live updates to AMP pages as new content becomes available in the source document.
amp-mustache
amp-mustache templates are a simple, structured templating system based on mustache.
amp-sidebar
A sidebar provides a way to display meta content intended for temporary access (navigation links, buttons, menus, etc.).
amp-social-share
The Social Share extension provides a common interface for share buttons, styled to complement each other.
amp-springboard-player
Embed videos hosted on the Springboard Video Platform in your AMP HTML files.
amp-sticky-ad
amp-sticky-ad adds support for ad units that always take a fixed place in the viewport in your AMP HTML files.
amp-user-notification
Use amp-user-notification to display a dismissable notification to the user.
Advanced
Advanced AMP integrations. Learn how to get the most out of AMP.
amp-user-notification with Server Endpoint
Use amp-user-notification to display a dismissable notification to the user.
Click-to-play overlay for amp-video
Click-to-play is a common UX feature for video players on the web.
Custom Loading Indicators
While the AMP runtime fetches content from endpoints, it will display a loading indicator.
How to create interactive AMP pages?
This samples demonstrates how to embed interactive charts into AMP files.
How to support Images with unknown Dimensions?
This sample demonstrates how it is possible to embed images with unknown dimensions into an AMP page while maintaining the correct aspect ratio.
Integrating Videos in AMP an Overview
There many different ways to integrate videos in AMP HTML files.
Long List of amp-instagram Embeds
A page with a long list of amp-instagram embeds to show how fast and responsive AMP pages are, this example contains 15 amp-instagram embeds.
Payments in AMP
Via amp-iframe and the allowpaymentrequest attribute, AMP pages can support requesting payment information directly from the browser.
Star Rating
This star rating widget is implemented using only CSS, given AMP's restriction on custom JavaScript.
Tab Panels with amp-selector
This is a implementation of tab panels that uses amp-selector.
Using the AMP URL API
The AMP URL API retrieves the matching AMP URLs for a given list of URLs.
Using the Google AMP Cache
The Google AMP Cache stores valid AMPs and provides a consistently fast access to AMPs.
Video Carousels with amp-carousel
The amp-carousel component works not only great for image galleries, but also for video galleries.
Samples & Templates
Templates and metadata samples for different kinds of AMPs.
Comment Section
This sample showcases how to build a comment section in AMP HTML using the amp-form component after a successful login flow.
Comments
Post a Comment