Details

In this article


Hide and show additional content.

  • Name: core/details
  • Category: text
  • API Version: 3
  • Block Type: Hybrid (static save + server enhancements)
  • Keywords: summary, toggle, disclosure

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
showContent boolean false
summary rich-text Source: rich-text. Selector: summary. Role: content
name string Source: attribute. Selector: .wp-block-details. HTML attr: name
placeholder string

Supports

Defined via the supports property in block.json.

Block Markup

This is a hybrid block. It saves static markup that the server may enhance during rendering.

<!-- wp:details {"summary":"Details Summary"} -->
<details class="wp-block-details"><summary>Details Summary</summary>
    <!-- wp:paragraph {"placeholder":"Type / to add a hidden block"} -->
    <p>Details Content</p>
    <!-- /wp:paragraph -->
</details>
<!-- /wp:details -->

Source