GitHub
amp-lightbox
Description: 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.
Availability: Stable.
Required Script: <script async custom-element="amp-lightbox" src="https://cdn.ampproject.org/v0/amp-lightbox-0.1.js"></script>.
Examples: https://ampbyexample.com/components/amp-lightbox/.
Behavior
The amp-lightbox component defines the child elements that will be displayed in a full-viewport overlay. It is triggered to take up the viewport when the user taps or clicks on an element with on attribute that targets amp-lightbox element's id.
Closing the lightbox
Pressing the escape key on the keyboard will close the lightbox. Alternatively setting the on attribute on one or more elements within the lightbox and setting it's method to close will close the lightbox when the element is tapped or clicked.
Styling
The amp-lightbox component can be styled with standard CSS.