Buttons block

Go to the List of Blocks

Use the Buttons block to add one or more buttons to your page or post. This block has been available since WordPress 5.4, when the button block was deprecated.

Add a Button block

To add the Buttons block to a page, click the Add block button to open the block inserter pop-up window and choose the Buttons block.

add a buttons block by typing slash and choosing buttons from the list

You can also use the keyboard shortcut /buttons to quickly insert a Buttons block.

Detailed instructions on adding blocks

The Buttons block comes with one individual button block by default. You can customize the text, link, and style for this button. To add more buttons, click the plus Add block button in the bottom right corner within the Buttons block, and a new button will appear. Note that the new button will follow the same style as the existing button.

Block toolbar

To view the block toolbar, click on the block, and the toolbar will be displayed.

Every block comes with unique toolbar icons and blocks specific user controls that allow you to manipulate the block right in the editor.The Buttons block has a toolbar for the individual button and a toolbar for the entire block.

For the entire block

Buttons block toolbar

The main toolbar for the entire block has the following buttons:

  • Transform to
  • Block-moving tools
  • Change items justification
  • Change vertical alignment
  • Align
  • Options

Transform to

Transform controls on buttons block toolbar

Click on the Transform button to convert the Buttons block into a Group, Details or Columns block.

Block-moving tools

Buttons block toolbar block moving tools

Use the block-moving tools to move the Buttons block.

The drag or six dots icon allows you to freely reposition the block anywhere within the editor by holding the icon and dragging it to the new location.

You can also use the arrow icons to move the block up or down within the group of nested blocks or when there are multiple blocks.

Get more information about moving a block within the editor.

Align

Buttons block toolbar align options

Use the change alignment tool to align the Buttons block. Choose one of the following options:

  • None – leaves the block the current size.
  • Wide width – increase the width of the block beyond the content size.
  • Full width – extend the block to cover the full width of the screen.

The “Wide width” and “Full width” alignment settings must be enabled by your WordPress theme. 

Change items justification

Buttons block toolbar showing Justification toolbar with Justify items center

The items justification setting allows justifying the buttons to the left, center, or right. There is also an option to “Space between items”. If it is selected, the Buttons block will be centered with equal spacing between the buttons. 

Change vertical alignment

Buttons block toolbar change vertical alignment controls with Stretch to fill selected

Use the change vertical alignment option to align buttons vertically with four possible options:

  • Align top
  • Align middle
  • Align bottom
  • Stretch to fill 

More options

The More Options menu represented by three vertical dots on the far right of the toolbar gives you more features such as the ability to duplicate or remove a block.

Read about these and other settings.

For an individual button

Block toolbar for Button block inside a Buttons container block

If you select a specific button, a new toolbar will appear with these new options:

  • Change block style
  • Block-moving tools
  • Align block
  • Justification
  • Vertical alignment
  • Align text
  • Link
  • Bold
  • Italic
  • More Rich Text controls
  • Options

Change block style

Change block styles for individual block

Use the change block style option to change the style of a particular button. 

Link

Button block toolbar link control

Use the link option to add a link to the button. It’s also possible to set it to open the link in a new tab

Read about more link editing options.

Bold and Italics

Button block toolbar with Bold and Italic

You can select the text of the block and use the “Bold” option or “Ctrl+B” / “Cmd+B” on your keyboard to bold it, which is usually heavier than the surrounding text.

You can select the text of the block and use the “Italic” option or “Ctrl+I” / “Cmd+I” on your keyboard to italicize it, which usually appears slanted to the right.

More rich text options

The drop-down menu to the left of the More options menu contains a range of additional rich text editing options such as highlighting, inline code, strikethrough, and more.

Read about more rich text editing options.

More options

The More Options menu represented by three vertical dots on the far right of the toolbar gives you more features such as the ability to duplicate or remove a block.

Read about these and other settings.

Block settings

The settings button at the top right corner of editor

The block settings panel contains customization options specific to the block. To open it, select the block and click the Settings button next to the Publish button.

When the entire Buttons block is selected, you have the Layout, Typography, Dimensions, and Advanced customization settings.

Buttons block settings

When the entire Buttons block is selected, you have several settings for customization.

Buttons Block settings
Buttons block styles

Layout

The Buttons block provides layout settings to change item justification and orientation.

Layout settings for the buttons block

When a specific button from the Buttons block is selected, you have the Styles, Width, Color, Typography, Dimensions, Border, and Advanced customization settings.

This article provides details about layout settings. 

Color

The Buttons block provides Color settings options to change the text and background colors

See this guide for more information about changing colors.

Typography

The Buttons block provides typography settings to change the font family, size, appearance, line height, letter case, letter spacing, and decoration.

Get more details about changing typography settings.

Dimensions

The Buttons block provides dimensions settings options to change padding and margin size.

Learn more about dimension controls.

Border

Border settings provide options to control the width and radius for the Buttons block.

Learn more about border settings.

Individual button block settings

When an individual button is selected there are several settings and styles you can apply.

Button block settings
Button block styles

Width settings

Each button can have its own width setting inside the Button block based on a % value.

Advanced settings

HTML anchor allows you to make a unique anchor text for a Button block and link it to another web page. For more detail, refer to Page Jumps.

The Additional CSS class(es) lets you add CSS class(es) to your button, allowing you to write custom CSS and style the button as you see fit.

Based on which style you choose for the button block, WordPress automatically adds a CSS class to that button block. You can find the class in the Advanced settings panel under Additional CSS class(es). You can also add additional classes with spaces.

HTML Element

The Button block lets you choose which HTML element it uses, directly from the Advanced settings panel. You can switch between using an anchor (<a>) link or a button (<button>) element, helping you match the markup to the intended behavior. This improves accessibility by making it easier to use semantic, screen‑reader‑friendly HTML without writing custom code.

You can add a Link relation attribute to each button in the block. This is a more advanced feature that enables to control the button link’s rel attribute, The rel attribute defines the relationship between a linked resource and the button. Eg: for rel attributes are nofollow, external, stylesheet, pingback, preload, prefetch, prev etc

Styles settings

Button style variations

It’s possible to change the individual button style depending on your theme. Hover over a particular style to see how a style such as fill or outline will look.

Color

The Button block provides Color settings options to change the text and background colors

See this guide for more information about changing colors.

Typography

The Button block provides typography settings to change the font family, size, appearance, line height, letter case, letter spacing, and decoration.

Get more details about changing typography settings.

Dimensions

The Button block provides dimensions settings options to change padding and margin size.

Learn more about dimension controls.

Border & Shadow

Border settings provide options to control the width and radius for the Button block. You can also apply a shadow.

Learn more about border & shadow settings.

Changelog

  • Updated 2026-04-08 (props to @karks88 @zunaid321 @ShatilKhan @lumumbapl @karthick-murugan @awetz583)
    • Added shadow setting for button block
    • Updated images and video
  • Updated 2025-12-02
    • Added HTML Element under Advanced section (props to @annezazu)
  • Updated 2023-11-21
    • Updated screenshots for 6.4
  • Updated 2023-11-11
    • Updated title in sentence case
  • Updated 2023-06-09
    • Replaced “More rich text options” section with short summary linking to new dedicated page for rich text editing options.
  • Updated 2023-03-07
    • Revised formatting for the whole article
    • Updated content and all screenshots for 6.2
  • Updated 2022-11-22
    • Change alignment for images
    • Replaced redundant content
  • Updated 2022-08-18
    • Updated content, screenshots, and videos for 6.0.
    • Added explanation for adding individual buttons and style preservation.
    • Added new block toolbar options.
    • Added images and info for space between items and change vertical alignment.
    • Added details for the block settings sidebar info.
    • Updated info for the More options for the individual button block.
    • Removed Text Color from the block toolbar for the individual button block.
    • Added ALT tags for the images.
  • Updated 2022-02-15
    • Updated screenshots to 5.9
    • Updated video to 5.9
    • Added new settings for previous versions
    • Added Live example

Was this article helpful? How could it be improved?

First published

Last updated