Block support: Align
Last updated September 17, 2023.
The align block supports include none (which is the default content width set by the theme, centered in the editor), left, right, center, wide, and full width. Align is opt-in, and you can enable the alignments individually.
At this time, there is no known way to remove align none, even by filtering the block supports.
To enable all alignments in your custom block, set the value of supports > align to true:
"supports": {
"align": true
}
To only enable some of the alignments, you can use an array of strings with the alignment name:
"supports": {
"align": [ "wide", "full" ]
}
Lastly, the alignment block supports also include alignWide
, which I believe is a “left over” from before the block supports were moved from the index file to block.json. alignWide is used to enable or disable wide align. It defaults to true. It is currently only used inside the site logo, avatar, and button. These blocks first enable all alignments, and then removes wide, instead of using the array described above:
"supports": {
"align": false,
"alignWide": false
}
Blocks that supports align:
List all WordPress core blocks with complete align support:
Many text based blocks only support wide and full because they have a separate text align setting that positions the text to the left, right and center.
List all WordPress core blocks that registers support specifically for align full:
List all WordPress core blocks that registers support specifically for align wide:
Blocks with partial support:
Pullquote supports left, right, wide and full but not center.
Search supports align left, center and right, but not wide or full because it has a separate width setting that uses percentages.
Social icons supports align left, center and right.
Separator supports align center, wide, and full.
View blocks per attribute or block support:
Block Attributes
Select Block Attributes
__unstableLocation
addLinkToFeaturedImage
align
allowedBlocks
allowResize
allowResponsive
alt
area
arrow
aspectRatio
autoplay
avatarSize
backgroundColor
backgroundType
blockLayout
body
buttonPosition
buttonText
buttonUseIcon
byline
caption
categories
citation
columns
commentsToShow
content
contentPosition
controls
customBackgroundColor
customGradient
customIconBackgroundColor
customIconColor
customOverlayBackgroundColor
customOverlayColor
customOverlayTextColor
customText
customTextColor
description
dimRatio
direction
displayAsDropdown
displayAuthor
displayAvatar
displayDate
displayExcerpt
displayFeaturedImage
displayLayout
displayLoginAsForm
displayPostContent
displayPostContentRadio
displayPostDate
displayPreview
displayType
downloadButtonText
dropCap
excerptLength
featuredImageAlign
featuredImageSizeHeight
featuredImageSizeSlug
featuredImageSizeWidth
feedURL
fileId
fileName
fixedHeight
focalPoint
foot
format
gradient
hasChildren
hasFixedLayout
hasIcon
hasParallax
head
headings
height
href
icon
iconBackgroundColor
iconBackgroundColorValue
iconColor
iconColorValue
id
ids
imageCrop
imageFill
images
isDark
isLink
isNested
isRepeated
isStackedOnMobile
isTopLevelItem
isTopLevelLink
itemsToShow
kind
label
largestFontSize
legacy
level
link
linkClass
linkDestination
linkLabel
linkTarget
linkTo
loop
maxNestingLevel
mediaAlt
mediaId
mediaLink
mediaPosition
mediaSizeSlug
mediaType
mediaUrl
mediaWidth
minHeight
minHeightUnit
month
moreText
muted
namespace
noTeaser
numberOfTags
onlyIncludeCurrentPage
opacity
openInNewTab
opensInNewTab
openSubmenusOnClick
order
orderBy
ordered
overlayBackgroundColor
overlayColor
overlayMenu
overlayTextColor
paginationArrow
parentPageID
placeholder
playsInline
poster
postLayout
postsToShow
prefix
preload
previewable
previewHeight
providerNameSlug
query
queryId
redirectToCurrent
ref
rel
responsive
reversed
rgbBackgroundColor
rgbTextColor
scale
selectedAuthor
separator
service
shortCodeTransforms
shouldSyncIcon
showAvatar
showBio
showCommentsCount
showContent
showDownloadButton
showEmpty
showHierarchy
showLabel
showLabels
showMoreOnNewLine
showOnlyTopLevel
showPostCounts
showPostTitle
showPrefix
showSearchTerm
showSubmenuIcon
showTagCounts
showTitle
size
sizeSlug
slug
smallestFontSize
src
start
suffix
summary
tagName
taxonomy
templateLock
term
text
textAlign
textColor
textLinkHref
textLinkTarget
theme
title
tracks
type
url
useFeaturedImage
userId
value
values
verticalAlignment
width
widthUnit
year
Block Supports
Select Block Supports
__experimentalBorder: color
__experimentalBorder: radius
__experimentalBorder: style
__experimentalBorder: width
__experimentalLayout
__experimentalLayout: allowSizingOnChildren
__experimentalLayout: default flex
__experimentalLayout: default nowrap
__unstablePasteTextInline
Align
align: center
align: full
align: left
align: right
align: wide
Anchor
ariaLabel
className
color: __experimentalDuotone
color: background
color: gradients
color: link
color: text
dimensions: minHeight
filter
inserter
position: sticky
shadow
spacing: blockGap
spacing: blockGap horizontal
spacing: blockGap sides horizontal
spacing: blockGap sides vertical
spacing: blockGap vertical
spacing: margin
spacing: margin bottom
spacing: margin top
spacing: padding
spacing: padding horizontal
spacing: padding vertical
spacing: units em
spacing: units px
spacing: units rem
spacing: units vh
spacing: units vw
typography: __experimentalFontFamily
typography: __experimentalFontStyle
typography: __experimentalFontWeight
typography: __experimentalLetterSpacing
typography: __experimentalTextDecoration
typography: __experimentalTextTransform
typography: fontSize
typography: lineHeight
units: em
units: rem
units: vh
units: vw