block.json 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/button",
  5. "title": "Button",
  6. "category": "design",
  7. "parent": [ "core/buttons" ],
  8. "description": "Prompt visitors to take action with a button-style link.",
  9. "keywords": [ "link" ],
  10. "textdomain": "default",
  11. "attributes": {
  12. "url": {
  13. "type": "string",
  14. "source": "attribute",
  15. "selector": "a",
  16. "attribute": "href"
  17. },
  18. "title": {
  19. "type": "string",
  20. "source": "attribute",
  21. "selector": "a",
  22. "attribute": "title"
  23. },
  24. "text": {
  25. "type": "string",
  26. "source": "html",
  27. "selector": "a"
  28. },
  29. "linkTarget": {
  30. "type": "string",
  31. "source": "attribute",
  32. "selector": "a",
  33. "attribute": "target"
  34. },
  35. "rel": {
  36. "type": "string",
  37. "source": "attribute",
  38. "selector": "a",
  39. "attribute": "rel"
  40. },
  41. "placeholder": {
  42. "type": "string"
  43. },
  44. "backgroundColor": {
  45. "type": "string"
  46. },
  47. "textColor": {
  48. "type": "string"
  49. },
  50. "gradient": {
  51. "type": "string"
  52. },
  53. "width": {
  54. "type": "number"
  55. }
  56. },
  57. "supports": {
  58. "anchor": true,
  59. "align": true,
  60. "alignWide": false,
  61. "color": {
  62. "__experimentalSkipSerialization": true,
  63. "gradients": true,
  64. "__experimentalDefaultControls": {
  65. "background": true,
  66. "text": true
  67. }
  68. },
  69. "typography": {
  70. "fontSize": true,
  71. "__experimentalFontFamily": true,
  72. "__experimentalDefaultControls": {
  73. "fontSize": true
  74. }
  75. },
  76. "reusable": false,
  77. "spacing": {
  78. "__experimentalSkipSerialization": true,
  79. "padding": [ "horizontal", "vertical" ],
  80. "__experimentalDefaultControls": {
  81. "padding": true
  82. }
  83. },
  84. "__experimentalBorder": {
  85. "radius": true,
  86. "__experimentalSkipSerialization": true,
  87. "__experimentalDefaultControls": {
  88. "radius": true
  89. }
  90. },
  91. "__experimentalSelector": ".wp-block-button__link"
  92. },
  93. "styles": [
  94. { "name": "fill", "label": "Fill", "isDefault": true },
  95. { "name": "outline", "label": "Outline" }
  96. ],
  97. "editorStyle": "wp-block-button-editor",
  98. "style": "wp-block-button"
  99. }