Creating an AMP Accordion

An Accordion is an interactive block that lets you expand or collapse parts of content inside an email.

Use it when you need to:

  • reduce the amount of visible content;
  • move additional information into expandable sections;
  • show details only after user interaction.
Email accordion block with four collapsed sections and a cursor hovering over Smart home & accessories, with a Discounts section and product cards below
🚧

Important

To send AMP-powered emails, you must first register with Google as a dynamic sender. This registration process requires you to submit your sending domain and a real AMP email sample to Google for review. Until approved, AMP content will not render for Gmail recipients.

Adding the Block

  1. Create a new email or open an existing one.
  2. Add the Accordion block to the template.
Email editor with the Accordion block icon boxed in red in the left toolbar and a red arrow pointing to an empty accordion section in the template
  1. Click the block to open its settings.

Adding Sections

By default, the accordion contains one section.

To add a new section:

  1. Click + and enter a Title.
Accordion block settings panel with the + button and Section 2 Title field boxed in red
  1. Click the content area of the section.
  2. Select a block to add.
šŸ“˜

Note

The accordion can contain any type of block.

Let’s look at an example of an accordion with an image.

Email editor with the left toolbar boxed in red and the Drop content here area boxed in red inside the expanded appliances accordion section
  1. Add an image — choose a file from the uploaded images or upload a new one.
Accordion appliances section with the Image block icon boxed in red and the Image gallery Drag-n-drop your image or paste URL area boxed in red
šŸ‘

Recommendation

Use images of the same size. This helps:

  • keep the layout clean;
  • prevent content shifting;
  • ensure smooth section expansion.

If images have different sizes, edit them in the built-in editor:

  • change the scale;
  • adjust proportions.
Image block settings panel with the built-in image editing icon boxed in red next to an uploaded appliances photo

Accordion Settings

Settings Tab

Controls how sections behave.

  • Expanded. Defines whether a section appears expanded when the email opens. Configure this separately for each section
  • Gap Between Sections. Sets the distance between section titles in pixels.
  • Auto-collapsing. Allows only one section to remain open at a time. Opening a new section closes the previous one.
  • Animated Opening. Adds a smooth opening and closing effect for sections.
Accordion block settings panel with the Settings tab boxed in red and the Expanded, Gap Between Sections, Auto-collapsing, and Animated Opening options boxed in red

Styles tab

Contains visual settings for the accordion: font, colors, title alignment, background borders.

Accordion block settings panel with the Styles tab boxed in red, showing font, color, alignment, and border options, next to an accordion with green section titles

Creating an HTML Version for Clients Without AMP Support

The AMP accordion appears only in clients that support AMPHTML, so create an alternative HTML version of the content. For example, use an Image block.

  1. Add an Image block.
  2. Enable the Include in HTML version option in the block settings.
Image block settings panel with the HTML badge on the appliances photo boxed in red and the HTML option boxed in red in the Include in row

Preview

  1. Click Preview.
Email editor toolbar with the Preview button boxed in red
  1. Switch between the tabs:
  • ⚔ HTML — the AMP-powered version
  • HTML — the standard HTML fallback
Email preview panel with the lightning-bolt HTML tab selected in the top right, showing the collapsed accordion sections and Discounts section

Check:

  • whether the accordion works correctly;
  • whether the HTML version appears properly.

Checking the AMP Email for Errors

In the preview window, click Errors to see the description.

Email preview window with the Errors 49 button boxed in red and an AMP HTML validation failed popup listing found errors

If necessary:

  • fix the code in the editor;
  • copy the code;
  • or open it in Google Playground for validation.

Did this page help you?