Block Attributes Glossary

Attributes are the options and content that control blocks. The block development process involves defining how these attributes are drawn from the markup that is saved in the database.

Attributes may also be passed in to posts via block templates, allowing developers to control the default settings or content for any block. 

All Blocks

Block Attributes

ncsu-blocks/block-attributes

Attributes

  • className:
    • type: string
  • layout:
    • type: string

Paragraph

core/paragraph

Attributes

  • content:
    • type: array
    • source: children
    • selector: p
    • default: [ ]
  • align:
    • type: string
  • dropCap:
    • type: boolean
    • default: false
  • placeholder:
    • type: string
  • width:
    • type: string
  • textColor:
    • type: string
  • backgroundColor:
    • type: string
  • fontSize:
    • type: string
  • customFontSize:
    • type: number
  • className:
    • type: string
  • layout:
    • type: string

Image

core/image

Attributes

  • url:
    • type: string
    • source: attribute
    • selector: img
    • attribute: src
  • alt:
    • type: string
    • source: attribute
    • selector: img
    • attribute: alt
    • default: “”
  • caption:
    • type: array
    • source: children
    • selector: figcaption
  • href:
    • type: string
    • source: attribute
    • selector: figure > a
    • attribute: href
  • id:
    • type: number
  • align:
    • type: string
  • width:
    • type: number
  • height:
    • type: number
  • className:
    • type: string
  • layout:
    • type: string

Heading

core/heading

Attributes

  • content:
    • type: array
    • source: children
    • selector: h1,h2,h3,h4,h5,h6
  • nodeName:
    • type: string
    • source: property
    • selector: h1,h2,h3,h4,h5,h6
    • property: nodeName
    • default: “H2”
  • align:
    • type: string
  • placeholder:
    • type: string
  • anchor:
    • type: string
    • source: attribute
    • attribute: id
    • selector: *
  • className:
    • type: string
  • layout:
    • type: string

Gallery

core/gallery

Attributes

  • align:
    • type: string
    • default: “none”
  • images:
    • type: array
    • default: [ ]
    • source: query
    • selector: ul.wp-block-gallery .blocks-gallery-item
    • query: Object
  • columns:
    • type: number
  • imageCrop:
    • type: boolean
    • default: true
  • linkTo:
    • type: string
    • default: “none”
  • className:
    • type: string
  • layout:
    • type: string

List

core/list

Attributes

  • nodeName:
    • type: string
    • source: property
    • selector: ol,ul
    • property: nodeName
    • default: “UL”
  • values:
    • type: array
    • source: children
    • selector: ol,ul
    • default: [ ]
  • className:
    • type: string
  • layout:
    • type: string

Quote

core/quote

Attributes

  • value:
    • type: array
    • source: query
    • selector: blockquote > p
    • query: Object
    • default: [ ]
  • citation:
    • type: array
    • source: children
    • selector: cite
  • align:
    • type: string
  • style:
    • type: number
    • default: 1
  • className:
    • type: string
  • layout:
    • type: string

Shortcode

core/shortcode

Attributes

  • text:
    • type: string
    • source: text
  • layout:
    • type: string

Audio

core/audio

Attributes

  • src:
    • type: string
    • source: attribute
    • selector: audio
    • attribute: src
  • caption:
    • type: array
    • source: children
    • selector: figcaption
  • id:
    • type: number
  • align:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Button

core/button

Attributes

  • url:
    • type: string
    • source: attribute
    • selector: a
    • attribute: href
  • title:
    • type: string
    • source: attribute
    • selector: a
    • attribute: title
  • text:
    • type: array
    • source: children
    • selector: a
  • align:
    • type: string
    • default: “none”
  • color:
    • type: string
  • textColor:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Categories

core/categories

Attributes

  • showPostCounts:
    • type: boolean
    • default: false
  • displayAsDropdown:
    • type: boolean
    • default: false
  • showHierarchy:
    • type: boolean
    • default: false
  • align:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Code

core/code

Attributes

  • content:
    • type: string
    • source: property
    • selector: code
    • property: textContent
  • className:
    • type: string
  • layout:
    • type: string

Columns (Experimental)

core/columns

Attributes

  • columns:
    • type: number
    • default: 2
  • align:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Cover Image

core/cover-image

Attributes

  • title:
    • type: array
    • source: children
    • selector: p
  • url:
    • type: string
  • align:
    • type: string
  • contentAlign:
    • type: string
    • default: “center”
  • id:
    • type: number
  • hasParallax:
    • type: boolean
    • default: false
  • dimRatio:
    • type: number
    • default: 50
  • className:
    • type: string
  • layout:
    • type: string

Embed

core/embed

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Twitter

core-embed/twitter

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

YouTube

core-embed/youtube

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Facebook

core-embed/facebook

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Instagram

core-embed/instagram

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

WordPress

core-embed/wordpress

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

SoundCloud

core-embed/soundcloud

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Spotify

core-embed/spotify

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Flickr

core-embed/flickr

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Vimeo

core-embed/vimeo

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Animoto

core-embed/animoto

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Cloudup

core-embed/cloudup

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

CollegeHumor

core-embed/collegehumor

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Dailymotion

core-embed/dailymotion

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Funny or Die

core-embed/funnyordie

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Hulu

core-embed/hulu

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Imgur

core-embed/imgur

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Issuu

core-embed/issuu

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Kickstarter

core-embed/kickstarter

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Meetup.com

core-embed/meetup-com

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Mixcloud

core-embed/mixcloud

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Photobucket

core-embed/photobucket

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Polldaddy

core-embed/polldaddy

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Reddit

core-embed/reddit

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

ReverbNation

core-embed/reverbnation

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Screencast

core-embed/screencast

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Scribd

core-embed/scribd

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Slideshare

core-embed/slideshare

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

SmugMug

core-embed/smugmug

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Speaker

core-embed/speaker

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

TED

core-embed/ted

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Tumblr

core-embed/tumblr

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

VideoPress

core-embed/videopress

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

WordPress.tv

core-embed/wordpress-tv

Attributes

  • url:
    • type: string
  • caption:
    • type: array
    • source: children
    • selector: figcaption
    • default: [ ]
  • align:
    • type: string
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Classic

core/freeform

Attributes

  • content:
    • type: string
    • source: html
  • layout:
    • type: string

Custom HTML

core/html

Attributes

  • content:
    • type: string
    • source: html
  • layout:
    • type: string

Latest Posts

core/latest-posts

Attributes

  • categories:
    • type: string
  • postsToShow:
    • type: number
    • default: 5
  • displayPostDate:
    • type: boolean
    • default: false
  • postLayout:
    • type: string
    • default: “list”
  • columns:
    • type: number
    • default: 3
  • align:
    • type: string
    • default: “center”
  • order:
    • type: string
    • default: “desc”
  • orderBy:
    • type: string
    • default: “date”
  • className:
    • type: string
  • layout:
    • type: string

More

core/more

Attributes

  • customText:
    • type: string
  • noTeaser:
    • type: boolean
    • default: false
  • layout:
    • type: string

Preformatted

core/preformatted

Attributes

  • content:
    • type: array
    • source: children
    • selector: pre
  • className:
    • type: string
  • layout:
    • type: string

Pullquote

core/pullquote

Attributes

  • value:
    • type: array
    • source: query
    • selector: blockquote > p
    • query: Object
  • citation:
    • type: array
    • source: children
    • selector: cite
  • align:
    • type: string
    • default: “none”
  • className:
    • type: string
  • layout:
    • type: string

Shared Block

core/block

Attributes

  • ref:
    • type: number
  • layout:
    • type: string

Separator

core/separator

Attributes

  • className:
    • type: string
  • layout:
    • type: string

Subhead

core/subhead

Attributes

  • content:
    • type: array
    • source: children
    • selector: p
  • className:
    • type: string
  • layout:
    • type: string

Table

core/table

Attributes

  • content:
    • type: array
    • source: children
    • selector: table
    • default: [ Object ]
  • align:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Text Columns

core/text-columns

Attributes

  • content:
    • type: array
    • source: query
    • selector: p
    • query: Object
    • default: [ [ ], [ ] ]
  • columns:
    • type: number
    • default: 2
  • width:
    • type: string
  • className:
    • type: string
  • layout:
    • type: string

Verse

core/verse

Attributes

  • content:
    • type: array
    • source: children
    • selector: pre
  • className:
    • type: string
  • layout:
    • type: string

Video

core/video

Attributes

  • align:
    • type: string
  • id:
    • type: number
  • src:
    • type: string
    • source: attribute
    • selector: video
    • attribute: src
  • caption:
    • type: array
    • source: children
    • selector: figcaption
  • className:
    • type: string
  • layout:
    • type: string