- There are two default button styles: Default and Outline
- Button groups can be justified left, center, right or spaced between
- Buttons width can be set to 25%, 50%, 75%, 100%
- Keep labels short and use sentence case
Block example
theme.json
Buttons
- core/buttons
| Category | Configuration |
|---|---|
| Color | background: Available gradient: Available text: — |
| Typography | fontSize: Available lineHeight: Available |
| Spacing | padding: Available margin: Available blockGap: Available |
| Border | border: Available radius: Available |
| Filter | duotone: — |
| Shadow | — |
| Css | Available |
Json example
"core/buttons": {
"spacing": {
"blockGap": {
"left": "var(--wp--preset--spacing--small)",
"top": "var(--wp--preset--spacing--small)"
}
}
}Button
- core/button
| Category | Configuration |
|---|---|
| Color | background: Available graduent: Available text: Available |
| Typography | fontSize: Available lineHeight: Available |
| Spacing | padding: Available margin: Available blockGap: Available |
| Border | border: Available radius: Available |
| Filter | duotone: — |
| Shadow | Available |
| Css | Available |
Json example
"core/button": {
"border": {
"radius": {
"bottomLeft": "var(--wp--preset--border-radius--extra-large)",
"bottomRight": "var(--wp--preset--border-radius--extra-large)",
"topLeft": "var(--wp--preset--border-radius--extra-large)",
"topRight": "var(--wp--preset--border-radius--extra-large)"
}
},
"css": "user-select: none;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\nmin-height: var(--wp--custom--medium-height);\ntransition: opacity var(--wp--custom--transition-normal); \n&:hover { opacity: 0.8; } \n&:active { opacity: 0.6 }",
"spacing": {
"padding": {
"left": "var(--wp--preset--spacing--extra-large)",
"right": "var(--wp--preset--spacing--extra-large)"
}
},
"typography": {
"lineHeight": "1"
}
}




