List of controls supported by gb_blocks service while registering Gutenberg blocks
These are the controls currently supported by the gb-blocks service while registering controls for a Gutenberg block
| Control Key (type) | Core Datatype | Target Interface Element Description |
text |
String |
Standard single-line textual form field input. |
textarea |
String |
Multi-line textual box element optimized for extensive paragraph narratives. |
number |
Number |
Integer or float numeric entry control. |
small-number |
Number |
Compact numeric utility input with explicit min/max scale attributes. |
select |
String |
Dropdown selector box element populating static dropdown configurations. |
toggle |
Boolean |
True/false binary switch element representing application flags. |
radio |
String |
Mutually exclusive radio selection groups. |
checkbox |
Array |
Multiple selection array field grouping lists of items. |
single-checkbox |
Boolean |
Standalone singular checkbox form interface element. |
image |
Object |
Media attachment selector capturing ID, Source URL, and Alternative text object trees. |
attributes-repeater |
Array |
Row item builder tracking variable sets of explicit metadata properties ( |
row_repeater |
Array |
Dynamic nested layout matrix looping configured fields dynamically across multiple rows. |
innerblocks |
String |
Area allowing insertion of child Gutenberg layout sub-components inside the primary block frame. |
title |
String |
Specialized semantic input field explicitly targeted for Title mappings. |
purpose |
String |
Semantic multi-line text input field mapped explicitly for structural explanations. |
query |
String |
High-capacity multi-line input block explicitly intended for typing database syntax queries. |
date |
String |
Standard system calendar input utilizing standardized string patterns. |
service |
String |
Input targeting technical path pointers to executable logic targets. |
awesome_code |
String |
High-volume multi-line input canvas tailored for writing code. |
env_path |
String |
Dedicated text control designed to map precise runtime dot-notation location mappings. |
Here is how you register them, each filed used by your block. The “sections” allows you to register the tabs, that are visible in the blocks
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
[arr.create o.set='template.controls'] [sections new] [name _value='section_content' /] [title _value="Content" /] [icon _value="edit" /] [fields new] { "type": "title", "name": "author", "label": "Author ", "attr_name": "content.author", "validation": { "required": true } } [/fields] [fields new] { "type": "textarea", "name": "service-description", "label": "Testimonial", "attr_name": "content.description" } [/fields] [/sections] [sections new] [name _value='section_style' /] [title _value="Style" /] [icon _value="admin-settings" /] [fields new] { "type": "text", "name": "button-text", "label": "Class for Author", "attr_name": "style.author_class", "default": "bg-warning" } [/fields] [/sections] [/arr.create] |