Reference Source
import {Accordion} from '@adobe/coral-spectrum'
public class | source

Accordion

Expression Extends:

class Accordion extends BaseComponent(HTMLElement)

Mixin Extends:

HTMLElement, BaseComponent

An Accordion component consisting of multiple collapsible items.

See:

Example:

Markup
<coral-accordion></coral-accordion>
JS constructor
new Coral.Accordion();

Static Member Summary

Static Public Members
public static

Returns Accordion variants.

Member Summary

Public Members
public

The Collection Interface that allows interacting with the items that the component contains.

public

The heading level for Accordion items within the Accordion

  • 3 by default.

public

Indicates whether the accordion accepts multiple selected items.

public

Returns the first selected item in the Accordion.

public

Returns an Array containing the set selected items.

public

The Accordion's variant. See AccordionVariantEnum.

  • AccordionVariantEnum.DEFAULT by default.
  • reflected

Static Public Members

public static variant: AccordionVariantEnum: * source

Returns Accordion variants.

Public Members

public items: Collection source

The Collection Interface that allows interacting with the items that the component contains.

  • read-only

public level: Number source

The heading level for Accordion items within the Accordion

  • 3 by default.
  • reflected

public multiple: Boolean source

Indicates whether the accordion accepts multiple selected items.

  • false by default.
  • reflected

public selectedItem: AccordionItem source

Returns the first selected item in the Accordion. The value null is returned if no element is selected.

  • read-only

public selectedItems: Array<AccordionItem> source

Returns an Array containing the set selected items.

  • read-only

public variant: String source

The Accordion's variant. See AccordionVariantEnum.

  • AccordionVariantEnum.DEFAULT by default.
  • reflected