Title: Comments
Published: June 7, 2026
Last modified: October 14, 2026

---

# Comments

## In this article

 * [Attributes](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#attributes)
 * [Supports](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#supports)
 * [Context](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#context)
 * [Block Markup](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#block-markup)
 * [Source](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#source)

 An advanced block that allows displaying post comments using different visual 
configurations.

 * **Name:** `core/comments`
 * **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/)
 * **API Version:** [3](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/)
 * **Block Type:** [Hybrid](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/)(
   static save + server enhancements)

## 󠀁[Attributes](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#attributes)󠁿

_Defined via the [`attributes`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/)
property in block.json._

  |  Attribute |  [Type](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation) |  [Default](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#default-value) |  Description |  
   |  `tagName` |  `string` |  `"div"` |  — |  
 |  `legacy` |  `boolean` |  `false` |  — |

## 󠀁[Supports](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#supports)󠁿

_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/)
property in block.json._

 * [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor):`
   true`
 * [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align):`"
   wide"`, `"full"`
 * [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html):`
   false`
 * [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
    - `backgroundImage`: `true`
    - `backgroundSize`: `true`
    - `gradient`: `true`
 * [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
    - [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients):`
      true`
    - [`button`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-button):`
      true`
    - [`heading`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-heading):`
      true`
    - [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link):`
      true`
 * [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
    - `margin`: `true`
    - `padding`: `true`
 * [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
    - [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize):`
      true`
    - [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight):`
      true`

## 󠀁[Context](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#context)󠁿

_Defined via the [`usesContext` and `providesContext`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/)
properties in block.json._

**Uses context:**

 * `postId`
 * `postType`

## 󠀁[Block Markup](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#block-markup)󠁿

This is a [**hybrid block**](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/).
It saves static markup that the server may enhance during rendering.

    ```html
    <!-- wp:comments {"className":"comments-post-extra"} -->
    <div class="wp-block-comments comments-post-extra"><!-- wp:comments-title /-->

        <!-- wp:comment-template -->
        <!-- wp:columns -->
        <div class="wp-block-columns"><!-- wp:column {"width":"40px"} -->
        <div class="wp-block-column" style="flex-basis:40px"><!-- wp:avatar {"size":40,"style":{"border":{"radius":"20px"}}} /--></div>
        <!-- /wp:column -->

        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:comment-author-name {"fontSize":"small"} /-->

        <!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"flex"}} -->
        <div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:comment-date {"fontSize":"small"} /-->

        <!-- wp:comment-edit-link {"fontSize":"small"} /--></div>
        <!-- /wp:group -->

        <!-- wp:comment-content /-->

        <!-- wp:comment-reply-link {"fontSize":"small"} /--></div>
        <!-- /wp:column --></div>
        <!-- /wp:columns -->
        <!-- /wp:comment-template -->

        <!-- wp:comments-pagination /-->

        <!-- wp:post-comments-form /--></div>
        <!-- /wp:comments -->
    ```

## 󠀁[Source](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments/?output_format=md#source)󠁿

 * [block.json](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/comments/block.json)(
   [reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/))
 * [Source directory](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/comments/)—
   browse the `edit` and `save` source files, `index.php`, and more.

First published

June 7, 2026

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: Comments ](https://github.com/WordPress/gutenberg/edit/trunk/packages/block-library/src/comments/README.md)

[  Previous: Comments Title](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments-title/)

[  Next: Login/out](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-loginout/)