Contains the hidden or revealed content beneath the heading.
- Name:
core/accordion-panel - Category: design
- API Version: 3
- Block Type: Static (saved in post content)
Block Relationships
Parent blocks (direct):
– core/accordion-item
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
templateLock |
string \| boolean |
false |
Enum: all, insert, contentOnly, false |
Supports
Defined via the supports property in block.json.
html:falsecolor:background:truegradients:true
interactivity:truespacing:padding:trueblockGap:true
typography:fontSize:truelineHeight:true
shadow:truelayout:allowEditing:false
visibility:falsecontentRole:trueallowedBlocks:truelock:false
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
core/accordion-open-by-default
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:accordion-panel -->
<div role="region" class="wp-block-accordion-panel">
<!-- wp:paragraph -->
<p>Accordion Panel Content</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:accordion-panel -->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.