You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add space-around justification option to Buttons Block #42536
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.
The Layout panel's "Justification" control becomes a select, so it can legibly fit 5 options. The select opens this:
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.
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.
@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):
(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)
Activity
jasmussen commentedon Sep 30, 2022
Possibly related: #44467
jasmussen commentedon Aug 21, 2026
Found some time for an idea. How about this?
The Layout panel's "Justification" control becomes a select, so it can legibly fit 5 options. The select opens this:
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.
jasmussen commentedon Aug 21, 2026
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.
jasmussen commentedon Aug 21, 2026
Also, not quite feeling the following, it's not clear this one will be userfriendly in practice, so sharing it mostly for completeness:
ciampo commentedon Aug 21, 2026
I guess Select is my preferred option, but Menu could also be an arguable choice.
@mirka the new
@wordpress/uiselect components would support custom icons, right?tellthemachines commentedon Aug 23, 2026
@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):
(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)
jasmussen commentedon Aug 24, 2026
Sounds good, I'd still prefer if we were able to have both justification and orientation controls be 50% width controls.
fcoveram commentedon Aug 28, 2026
I'm drawn to keep using the existing interactions (icon dropdown menu or toggle group) rather than using a new component control.
jasmussen commentedon Aug 28, 2026
You mean this one then, yes?
fcoveram commentedon Aug 28, 2026
Yes. Since the dropdown menu is triggered from the toolbar, I find odd to interact with a label-based control.