Fields
Field reference
Every entry in block.fields.json declares one Inspector control. The type picks the React component shown in the editor. The attributeKey picks the WP attribute name your React component receives.
Every control accepts the common keys id, attributeKey, label, helpText, default, parentPanelId, conditionalLogic, validation.
The plugin's code knows 50 field type names, counting aliases such as textarea and the three panel types. Each page below is built from the field's doc in the plugin (schemas/controls/); a page marked from the code is generated where no doc exists yet.
Text
Words a person types.
| Type | What it is |
|---|---|
text | The simplest controls. |
textarea (on the text page) | The simplest controls. |
richtext | Tiptap-backed rich text editor. |
wysiwyg | Backwards-compat alias for richtext. |
heading-level | A compound control — a text input for the heading text plus a dropdown that picks the heading level (h1..h6, p, div, span). |
heading (on the heading-level page) | A compound control — a text input for the heading text plus a dropdown that picks the heading level (h1..h6, p, div, span). |
email | Single-line input with type="email" so mobile keyboards show the @-key and browsers do basic validation. |
number | Numeric input with up/down spinners. |
code | Monospace textarea for code snippets. |
Choices
One or several from a fixed list, or on/off.
| Type | What it is |
|---|---|
select | Dropdown single-select. |
radio | Single-select shown as a vertical list of radio buttons. |
toggle | Two related controls. toggle is an on/off switch storing a boolean. toggle-group is a single-select segmented control storing the chosen value as a string. |
toggle-group (on the toggle page) | Two related controls. toggle is an on/off switch storing a boolean. toggle-group is a single-select segmented control storing the chosen value as a string. |
checkbox | Multi-select control. |
checkbox-group (on the checkbox page) | Multi-select control. |
button-group | Multi-select shown as a row of pressable buttons. |
Links and dates
Addresses, dates and times.
| Type | What it is |
|---|---|
url | URL picker with a custom display label and an "open in new tab" toggle. |
page-link | Placeholder type — currently falls through to the url control. |
date | Date picker. |
datetime | Date + time picker. |
Media
Pictures, files, icons and embedded content.
| Type | What it is |
|---|---|
image | Media library image picker. |
gallery | Multi-image picker with per-item focal point, size, repeat, and fixed-background settings. |
file | Non-image attachment picker (PDFs, documents, archives, etc.). |
icon | Visual picker over the WP 7.0+ icon registry. |
oembed | URL input with a live embed preview underneath. |
embed | A third-party widget — the snippet a provider gives you (Trustpilot, Calendly, Typeform, Elfsight…), pasted as it is. |
Design
How a block looks: colour, size, spacing and what paints it.
| Type | What it is |
|---|---|
color | Color picker pulling its palette from the active theme.json. |
background | What a box is painted with — a colour, a gradient, a picture, or a video playing behind its contents — one field, either/or. |
size | CSS length input with a unit dropdown (px, em, rem, %, vh, vw). |
spacing | Preset spacing scale (None / S / M / L) with a custom-value escape hatch. |
range | Slider control for numeric or token-bound values. |
Layout and motion
Where a list's items sit, what they do as the page scrolls, and shapes drawn on a block.
| Type | What it is |
|---|---|
layout | How a list's items sit on a wide screen — an advanced "cards per row". |
triggers | What a Layout's boxes do as the page scrolls, written as a small script: a box that stays on the screen, a slider that changes with the words being read, boxes that fade, move, scale, rotate or blur. |
path | A line a person shapes, with stops along it and a box of content set off from each stop: a road with places on it, a journey, a curved timeline. |
layers | A card of one shape with things laid over each other on it, each at its own place and its own depth: a product card with its name, a photo and a badge standing off it. |
marks | A block's brand marks: the blobs, the stamp, the note the site's style draws, placed on the block's band by a person on a popout canvas. |
Places on a picture
Pins and points set on an image.
| Type | What it is |
|---|---|
point | Where something sits on the image round it — a hotspot pin, a label on a photo. |
hotspots | Read from the code (no doc yet). From the code. |
pin-map | A picture you click to place the block's repeater children on — touchpoints on a site map, hotspots on a product shot. |
google-map | Address autocomplete plus a draggable map marker. |
Content from the site
Posts, terms, users and queries.
| Type | What it is |
|---|---|
post-object | Pick one or many posts (or any custom post type). |
relationship | Multi-select post relationship. |
taxonomy | Term picker for any taxonomy. |
user | WP user picker. |
query-loop | A paginated server-side query over a post type. |
Structure
Lists of rows, notes and panels that organise the sidebar.
| Type | What it is |
|---|---|
repeater | A list of rows in the sidebar: each row a small form (its fields), with Add, remove and drag to reorder. |
message | Display-only Inspector note. |
group | A sidebar panel that groups fields; stores nothing. From the code. |
panel | A sidebar panel that groups fields; stores nothing. From the code. |
tools-panel | A sidebar panel that groups fields; stores nothing. From the code. |
Keys every field takes
Reference, generated from the plugin source
| Key | Type | Description |
|---|---|---|
id | string | Unique within the block. Used to wire parentPanelId references. Required. |
type | string | The field type: one of the types below, or one a theme or plugin registered. Required. |
label | string | Required. |
attributeKey | string | Required for non-group controls. Becomes the WP block attribute name. |
attributeType | string / number / boolean / object / array / integer | |
default | Default value matching attributeType. | |
options | array | Choices for select / radio. Each is {label, value}. |
controlsGroup | string | Inspector tab: settings (the default), styles, or advanced (the Advanced panel of WordPress, for what only the person setting the block up needs). |
parentPanelId | string | Nests this control under a group-type control with this id. |
helpText | string | |
placeholder | string | |
validation | object | Author-side validation rules. Enforced client- and server-side. Keys: required, minLength, maxLength, min, max, pattern. |
conditionalLogic | object | Show this control only when another control matches a value. Shape: { field, operator, value }. |
From schemas/gcb.schema.json ($defs.control).
To add a type of your own, see Adding your own field type.