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

common

Attributes

  • blocks:
    • type: array
    • default: [ ]
  • className:
    • type: string

Callout – ncsu-blocks/callout

common

Attributes

  • body:
    • source: text
    • selector: .callout-body
  • headingType:
    • type: string
    • source: property
    • selector: h1,h2,h3,h4,h5,h6,p
    • property: nodeName
    • default: “P”
  • heading:
    • source: text
    • selector: .callout-heading
  • fontFace:
    • type: string
    • default: “univers-light”
  • textAlign:
    • type: string
    • default: “tc”
  • href:
    • source: attribute
    • selector: a
    • attribute: href
  • color:
    • type: string
    • default: “red”
  • imgSrc:
    • source: attribute
    • selector: img
    • attribute: src
  • imgSrcSet:
    • source: attribute
    • selector: img
    • attribute: srcset
  • imgSizes:
    • source: attribute
    • selector: img
    • attribute: sizes
  • imgAlt:
    • source: attribute
    • selector: img
    • attribute: alt
  • imgAlign:
    • type: string
    • default: “no”
  • imgID:
    • type: number
  • fontSize:
    • type: number
    • default: 3
  • blockAlign:
    • type: string
    • default: “center”
  • icon:
    • type: string
    • default: “wolfs-head”
  • hasIcon:
    • type: boolean
    • default: false
  • hasImage:
    • type: boolean
    • default: false
  • className:
    • type: string

Panel – ncsu-blocks/panel

common

Attributes

  • headingText:
    • type: string
    • default: null
  • nodeName:
    • type: string
    • source: property
    • selector: h1,h2,h3,h4,h5,h6,p
    • property: nodeName
    • default: “H2”
  • panelType:
    • type: string
    • default: “info”
  • collapsible:
    • type: boolean
    • default: true
  • initiallyOpen:
    • type: boolean
    • default: true
  • className:
    • type: string

Paragraph – core/paragraph

common

Attributes

  • content:
    • type: string
    • source: html
    • selector: p
    • default: “”
  • align:
    • type: string
  • dropCap:
    • type: boolean
    • default: false
  • placeholder:
    • type: string
  • textColor:
    • type: string
  • customTextColor:
    • type: string
  • backgroundColor:
    • type: string
  • customBackgroundColor:
    • type: string
  • fontSize:
    • type: string
  • customFontSize:
    • type: number
  • direction:
    • type: string
    • enum: [ ltr, rtl ]
  • className:
    • type: string

Image – core/image

common

Attributes

  • url:
    • type: string
    • source: attribute
    • selector: img
    • attribute: src
  • alt:
    • type: string
    • source: attribute
    • selector: img
    • attribute: alt
    • default: “”
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • href:
    • type: string
    • source: attribute
    • selector: figure > a
    • attribute: href
  • rel:
    • type: string
    • source: attribute
    • selector: figure > a
    • attribute: rel
  • linkClass:
    • type: string
    • source: attribute
    • selector: figure > a
    • attribute: class
  • id:
    • type: number
  • align:
    • type: string
  • width:
    • type: number
  • height:
    • type: number
  • linkDestination:
    • type: string
    • default: “none”
  • linkTarget:
    • type: string
    • source: attribute
    • selector: figure > a
    • attribute: target
  • className:
    • type: string

Heading – core/heading

common

Attributes

  • content:
    • type: string
    • source: html
    • selector: h1,h2,h3,h4,h5,h6
    • default: “”
  • level:
    • type: number
    • default: 2
  • align:
    • type: string
  • placeholder:
    • type: string
  • anchor:
    • type: string
    • source: attribute
    • attribute: id
    • selector: *
  • className:
    • type: string

Gallery – core/gallery

common

Attributes

  • images:
    • type: array
    • default: [ ]
    • source: query
    • selector: ul.wp-block-gallery .blocks-gallery-item
    • query: [ [ attribute, img, src ], [ attribute, img, data-link ], [ attribute, img, alt, ], [ attribute, img, data-id ], [ string, html, figcaption ] ]
  • ids:
    • type: array
    • default: [ ]
  • columns:
    • type: number
  • imageCrop:
    • type: boolean
    • default: true
  • linkTo:
    • type: string
    • default: “none”
  • align:
    • type: string
  • className:
    • type: string

List – core/list

common

Attributes

  • ordered:
    • type: boolean
    • default: false
  • values:
    • type: string
    • source: html
    • selector: ol,ul
    • multiline: li
    • default: “”
  • className:
    • type: string

Quote – core/quote

common

Attributes

  • value:
    • type: string
    • source: html
    • selector: blockquote
    • multiline: p
    • default: “”
  • citation:
    • type: string
    • source: html
    • selector: cite
    • default: “”
  • align:
    • type: string
  • className:
    • type: string

Shortcode – core/shortcode

widgets

Attributes

  • text:
    • type: string
    • source: text

Archives – core/archives

widgets

Attributes

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

Audio – core/audio

common

Attributes

  • src:
    • type: string
    • source: attribute
    • selector: audio
    • attribute: src
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • id:
    • type: number
  • autoplay:
    • type: boolean
    • source: attribute
    • selector: audio
    • attribute: autoplay
  • loop:
    • type: boolean
    • source: attribute
    • selector: audio
    • attribute: loop
  • preload:
    • type: string
    • source: attribute
    • selector: audio
    • attribute: preload
  • align:
    • type: string
  • className:
    • type: string

Button – core/button

layout

Attributes

  • url:
    • type: string
    • source: attribute
    • selector: a
    • attribute: href
  • title:
    • type: string
    • source: attribute
    • selector: a
    • attribute: title
  • text:
    • type: string
    • source: html
    • selector: a
  • backgroundColor:
    • type: string
  • textColor:
    • type: string
  • customBackgroundColor:
    • type: string
  • customTextColor:
    • type: string
  • align:
    • type: string
  • className:
    • type: string

Categories – core/categories

widgets

Attributes

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

Code – core/code

formatting

Attributes

  • content:
    • type: string
    • source: text
    • selector: code
  • className:
    • type: string

Columns – core/columns

layout

Attributes

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

Column – core/column

common

Attributes

  • className:
    • type: string

Cover – core/cover

common

Attributes

  • title:
    • type: string
    • source: html
    • 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
  • overlayColor:
    • type: string
  • customOverlayColor:
    • type: string
  • backgroundType:
    • type: string
    • default: “image”
  • className:
    • type: string

Embed – core/embed

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Twitter – core-embed/twitter

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

YouTube – core-embed/youtube

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Facebook – core-embed/facebook

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Instagram – core-embed/instagram

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

WordPress – core-embed/wordpress

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

SoundCloud – core-embed/soundcloud

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Spotify – core-embed/spotify

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Flickr – core-embed/flickr

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Vimeo – core-embed/vimeo

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Animoto – core-embed/animoto

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Cloudup – core-embed/cloudup

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

CollegeHumor – core-embed/collegehumor

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Dailymotion – core-embed/dailymotion

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Funny or Die – core-embed/funnyordie

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Hulu – core-embed/hulu

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Imgur – core-embed/imgur

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Issuu – core-embed/issuu

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Kickstarter – core-embed/kickstarter

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Meetup.com – core-embed/meetup-com

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Mixcloud – core-embed/mixcloud

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Photobucket – core-embed/photobucket

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Polldaddy – core-embed/polldaddy

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Reddit – core-embed/reddit

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

ReverbNation – core-embed/reverbnation

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Screencast – core-embed/screencast

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Scribd – core-embed/scribd

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Slideshare – core-embed/slideshare

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

SmugMug – core-embed/smugmug

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Speaker – core-embed/speaker

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Speaker Deck – core-embed/speaker-deck

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

TED – core-embed/ted

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

Tumblr – core-embed/tumblr

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

VideoPress – core-embed/videopress

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

WordPress.tv – core-embed/wordpress-tv

embed

Attributes

  • url:
    • type: string
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • type:
    • type: string
  • providerNameSlug:
    • type: string
  • allowResponsive:
    • type: boolean
    • default: true
  • align:
    • type: string
  • className:
    • type: string

File – core/file

common

Attributes

  • id:
    • type: number
  • href:
    • type: string
  • fileName:
    • type: string
    • source: html
    • selector: a:not([download])
  • textLinkHref:
    • type: string
    • source: attribute
    • selector: a:not([download])
    • attribute: href
  • textLinkTarget:
    • type: string
    • source: attribute
    • selector: a:not([download])
    • attribute: target
  • showDownloadButton:
    • type: boolean
    • default: true
  • downloadButtonText:
    • type: string
    • source: html
    • selector: a[download]
    • default: “Download”
  • align:
    • type: string
  • className:
    • type: string

Classic – core/freeform

formatting

Attributes

  • content:
    • type: string
    • source: html

Custom HTML – core/html

formatting

Attributes

  • content:
    • type: string
    • source: html

Media & Text – core/media-text

layout

Attributes

  • align:
    • type: string
    • default: “wide”
  • backgroundColor:
    • type: string
  • customBackgroundColor:
    • type: string
  • mediaAlt:
    • type: string
    • source: attribute
    • selector: figure img
    • attribute: alt
    • default: “”
  • mediaPosition:
    • type: string
    • default: “left”
  • mediaId:
    • type: number
  • mediaUrl:
    • type: string
    • source: attribute
    • selector: figure video,figure img
    • attribute: src
  • mediaType:
    • type: string
  • mediaWidth:
    • type: number
    • default: 50
  • isStackedOnMobile:
    • type: boolean
    • default: false
  • className:
    • type: string

Latest Comments – core/latest-comments

widgets

Attributes

  • className:
    • type: string
  • commentsToShow:
    • type: number
    • default: 5
    • minimum: 1
    • maximum: 100
  • displayAvatar:
    • type: boolean
    • default: true
  • displayDate:
    • type: boolean
    • default: true
  • displayExcerpt:
    • type: boolean
    • default: true
  • align:
    • type: string
    • enum: [ center, left, right, wide, full, ]

Latest Posts – core/latest-posts

widgets

Attributes

  • categories:
    • type: string
  • className:
    • 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
  • order:
    • type: string
    • default: “desc”
  • orderBy:
    • type: string
    • default: “date”

Unrecognized Block – core/missing

common

Attributes

  • originalName:
    • type: string
  • originalUndelimitedContent:
    • type: string
  • originalContent:
    • type: string
    • source: html

More – core/more

layout

Attributes

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

Page Break – core/nextpage

layout

Attributes

Preformatted – core/preformatted

formatting

Attributes

  • content:
    • type: string
    • source: html
    • selector: pre
    • default: “”
  • className:
    • type: string

Pullquote – core/pullquote

formatting

Attributes

  • value:
    • type: string
    • source: html
    • selector: blockquote
    • multiline: p
  • citation:
    • type: string
    • source: html
    • selector: cite
    • default: “”
  • mainColor:
    • type: string
  • customMainColor:
    • type: string
  • textColor:
    • type: string
  • customTextColor:
    • type: string
  • align:
    • type: string
  • className:
    • type: string

Separator – core/separator

layout

Attributes

  • className:
    • type: string

Reusable Block – core/block

reusable

Attributes

  • ref:
    • type: number

Spacer – core/spacer

layout

Attributes

  • height:
    • type: number
    • default: 100
  • className:
    • type: string

Subheading (deprecated) – core/subhead

common

Attributes

  • content:
    • type: string
    • source: html
    • selector: p
  • align:
    • type: string
  • className:
    • type: string

Table – core/table

formatting

Attributes

  • hasFixedLayout:
    • type: boolean
    • default: false
  • head:
    • type: array
    • default: [ ]
    • source: query
    • selector: thead tr
    • query: [ [ array, [ ], query, td,th, [ [ string, html ], [ string, td, tag ] ] ] ]
  • body:
    • type: array
    • default: [ ]
    • source: query
    • selector: tbody tr
    • query: [ [ array, [ ], query, td,th, [ [ string, html ], [ string, td, tag ] ] ] ]
  • foot:
    • type: array
    • default: [ ]
    • source: query
    • selector: tfoot tr
    • query: [ [ array, [ ], query, td,th, [ [ string, html ], [ string, td, tag ] ] ] ]
  • align:
    • type: string
  • className:
    • type: string

Reusable Template – core/template

reusable

Attributes

Text Columns (deprecated) – core/text-columns

layout

Attributes

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

Verse – core/verse

formatting

Attributes

  • content:
    • type: string
    • source: html
    • selector: pre
    • default: “”
  • textAlign:
    • type: string
  • className:
    • type: string

Video – core/video

common

Attributes

  • autoplay:
    • type: boolean
    • source: attribute
    • selector: video
    • attribute: autoplay
  • caption:
    • type: string
    • source: html
    • selector: figcaption
  • controls:
    • type: boolean
    • source: attribute
    • selector: video
    • attribute: controls
    • default: true
  • id:
    • type: number
  • loop:
    • type: boolean
    • source: attribute
    • selector: video
    • attribute: loop
  • muted:
    • type: boolean
    • source: attribute
    • selector: video
    • attribute: muted
  • poster:
    • type: string
    • source: attribute
    • selector: video
    • attribute: poster
  • preload:
    • type: string
    • source: attribute
    • selector: video
    • attribute: preload
    • default: “metadata”
  • src:
    • type: string
    • source: attribute
    • selector: video
    • attribute: src
  • align:
    • type: string
  • className:
    • type: string