Class AmpAccordion

AmpAccordion class

A UI element that facilitates showing/hiding different sections.

public class AmpAccordion : AmpComponent

Constructors

NameDescription
AmpAccordion()The default constructor.

Properties

NameDescription
Attributes { get; }AMP provides a set of common attributes that are extended to many AMP components.
DisableSessionStates { get; set; }Set this attribute on the amp-accordion to opt out of preserving the collapsed/expanded state of the accordion.
ExpandSingleSection { get; set; }Set this attribute on the amp-accordion to only allow one section to be expanded at a time.
Fallback { get; set; }A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
Placeholder { get; set; }The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.
override RequiredScript { get; }Required script that muct be added to head section.
Sections { get; }List of sections.

Methods

NameDescription
override ToAmpHtml()Represents amp html version of component.
override ToHtml()Represents html version of component.

See Also