Accordion
Show (and hide) content in a list
Last modified: April 11, 2023
Block names
t2/accordion
, t2/accordion-item
Properties (t2.json)
allowedBlocks
string[]Allowed inner blocks
layout.icons
Icon size.
Icon used when the accordion item is closed. The icon need to be registered as a T2 icon.
Icon used when the accordion item is open. The icon need to be registered as a T2 icon.
Style properties
Heading color
- --t2-accordion-color-heading
- Theme.json: wp.custom.t2-accordion.color.heading
- Default: inherit
Icon color
- --t2-accordion-color-icon
- Theme.json: wp.custom.t2-accordion.color.icon
- Default: currentColor
Heading font family
- --t2-accordion-typography-heading-font-family
- Theme.json: wp.custom.t2-accordion.typography.heading-font-family
- Default: inherit
Heading font size
- --t2-accordion-typography-heading-font-size
- Theme.json: wp.custom.t2-accordion.typography.heading-font-size
- Default: 1.125em
Heading font weight
- --t2-accordion-typography-heading-font-weight
- Theme.json: wp.custom.t2-accordion.typography.heading-font-weight
- Default: 700
Heading line-height
- --t2-accordion-typography-heading-line-height
- Theme.json: wp.custom.t2-accordion.typography.heading-line-height
- Default: 1.5
Item border
- --t2-accordion-item-border
- Theme.json: wp.custom.t2-accordion.item-border
- Default: thin
Item padding
- --t2-accordion-item-padding
- Default: 1rem
Base margin
- --t2-accordion-spacing-margin
- Default: 1.75em
Item margin
- --t2-accordion-spacing-item-margin
- Default: 0