Skip to content

Add space-around justification option to Buttons Block #42536

Open

Description

@mrwweb

What problem does this address?

The buttons block provides four alignment options which does not include all the potential values for justify-content in a flex container. I find that the space-around value in particular can be a really nice way of centering and filling available space, and so don't know why it's not available.

What is your proposed solution?

Add support for justify-content: space-around to the Buttons block. Consider also adding justify-content: space-evenly for nearly full coverage of all possible values.

Activity

  1. added
    [Type] Enhancement
    [Block] Buttons
    on Jul 19, 2022
  2. jasmussen commented on Sep 30, 2022

    @jasmussen
    Contributor

    Possibly related: #44467

  3. added
    [Status] In Progress
    on Aug 8, 2025
  4. jasmussen commented on Aug 21, 2026

    @jasmussen
    Contributor

    Found some time for an idea. How about this?

    Image

    The Layout panel's "Justification" control becomes a select, so it can legibly fit 5 options. The select opens this:

    Image

    The latter—radios and icons—is possible with this component, the question is whether "Select" as the opener is the right one. I defer to @WordPress/gutenberg-components here.

  5. jasmussen commented on Aug 21, 2026

    @jasmussen
    Contributor

    Noting that the above adds "Space evenly", if we would like to also add "Space around", we can do that too insofar as the dropdown should fit it. Let me know, happy to draw an additional icon.

  6. jasmussen commented on Aug 21, 2026

    @jasmussen
    Contributor

    Also, not quite feeling the following, it's not clear this one will be userfriendly in practice, so sharing it mostly for completeness:

    Image
  7. ciampo commented on Aug 21, 2026

    @ciampo
    Contributor

    I guess Select is my preferred option, but Menu could also be an arguable choice.

    @mirka the new @wordpress/ui select components would support custom icons, right?

  8. tellthemachines commented on Aug 23, 2026

    @tellthemachines
    Contributor

    @jasmussen note that Layout is now using ToolsPanel, and we've hidden wrapping and alignment by default for Buttons (each block can choose which controls to show by default):

    Image

    (Also because we can now show and hide whatever we like, moving the orientation control to a new line would also be an option if we wanted to just give the current justification control a bit more space)

  9. jasmussen commented on Aug 24, 2026

    @jasmussen
    Contributor

    Sounds good, I'd still prefer if we were able to have both justification and orientation controls be 50% width controls.

  10. fcoveram commented on Aug 28, 2026

    @fcoveram
    Contributor

    I'm drawn to keep using the existing interactions (icon dropdown menu or toggle group) rather than using a new component control.

  11. jasmussen commented on Aug 28, 2026

    @jasmussen
    Contributor

    You mean this one then, yes?

  12. fcoveram commented on Aug 28, 2026

    @fcoveram
    Contributor

    You mean #42536 (comment), yes?

    Yes. Since the dropdown menu is triggered from the toolbar, I find odd to interact with a label-based control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Buttons[Status] In Progress[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions