AccordionΒΆ

/libs/granite/ui/components/coral/foundation/accordion

The accordion.

It has the following content structure:

granite:Accordion
  1. granite:commonAttrs
  2. granite:renderCondition
  3. granite:container
multipleboolean

Whether multiple items can be opened at the same time.

variantstring
  1. default
  1. default
  2. quiet
  3. large

The variant of the accordion.

default
The default look and feel.
quiet
Quiet variant with minimal borders.
large
Large variant, typically used inside a navigation rail since it does not have borders on the sides.
marginboolean

Put vertical margin to the root element.

Each item at least has the following content structure:

granite:AccordionItem
jcr:titlestring
mandatory
i18n

The item title.

parentConfig
  1. granite:AccordionItemParentconfig

The item specific config for the parent.

granite:AccordionItemParentconfig
activeboolean

true to open the item initially; false otherwise.

disabledboolean

true to disable the item; false otherwise.

Example:

+ myaccordion
  - sling:resourceType = "granite/ui/components/coral/foundation/accordion"
  + items
    + item1
      - jcr:title = "Item 1"
    + item2
      - jcr:title = "Item 2"
      + parentConfig
        - active = true