Bricks Builder JSON Authoring
Generate complete Bricks designs as JSON that pastes or imports cleanly on the first try.
Default Deliverable
Produce an actual .json file in the workspace (not inline JSON) unless the user asks otherwise. Use the project's folder convention if one exists; otherwise bricks-json/{type}-{slug}.json. In the final response state: the file path, which JSON format you used, and the validation checks performed.
Workflow
- Pick the format — clipboard paste vs template import vs programmatic insert → references/json-formats.md
- Plan structure — semantic section → container → blocks tree; pick elements from the catalog → references/elements.md
- Style with settings — every
_ style key and its exact value shape → references/style-settings.md
- Wire data — dynamic tags, query loops, filters as needed (see routing table)
- Validate — checklist below, then deliver
Format Quick Reference
Clipboard (paste into builder) — the default for sections and page content:
{
"content": [ /* flat array of element nodes */ ],
"source": "bricksCopiedElements",
"sourceUrl": "https://example.com",
"version": "2.3.6",
"globalClasses": [ /* full class objects referenced by _cssGlobalClasses */ ],
"globalElements": []
}
Element node (every entry in content):
{
"id": "abc123",
"name": "heading",
"parent": "xyz789",
"children": [],
"settings": {},
"label": "Optional structure-panel label"
}
id: unique 6-char alphanumeric. parent: parent's id, or 0 for root elements.
- The array is flat — hierarchy lives entirely in
parent + children (ids must cross-reference exactly).
- Root elements are usually
section; never nest a section inside anything.
Task Routing
| Task |
Reference |
| Format selection, clipboard/template/meta storage, programmatic insert |
references/json-formats.md |
| Element catalog, per-element settings, nestables |
references/elements.md |
| Style keys, value shapes (color/typography/border/shadow/gradient/transform), responsive + hover grammar |
references/style-settings.md |
| Section/grid/flex recipes, cards, overlays, sticky, full designs |
references/layout-recipes.md |
Dynamic data tags {post_title}, args, {echo:} |
references/dynamic-data.md |
| ACF (incl. repeaters, groups, flexible content), Meta Box, JetEngine, Pods, CMB2 |
references/acf-providers.md |
Query loops (hasLoop + query), post/term/user queries |
references/query-loops.md |
| Faceted filters, AJAX pagination, load more, infinite scroll, live search |
references/query-filters.md |
Show/hide conditions (_conditions) |
references/conditions.md |
Interactions, animations, scroll triggers (_interactions) |
references/interactions.md |
| Popups (templates, triggers, limits, AJAX) |
references/popups.md |
| Template types, conditions, import/export, header/footer/archive/404 |
references/templates.md |
| Components, global classes, global variables, color palette |
references/components-classes.md |
| Theme styles, breakpoints, CSS generation order |
references/theme-styles.md |
| Form element, actions, validation |
references/forms.md |
| WooCommerce templates and elements |
references/woocommerce.md |
| PHP: custom elements with controls |
references/custom-elements.md |
| PHP: filters and actions |
references/hooks.md |
| Asset loading, builder permissions |
references/assets-permissions.md |
Ready-to-paste examples (hero, grids, ACF loops, filtered archive, header/footer, popup…): patterns/ — see patterns/INDEX.md.
Non-Negotiable Rules
- Flat tree integrity — every
children id exists as a node whose parent points back. No orphans, no duplicates.
- Verified value shapes only — colors are objects (
{"hex": "#222"} or {"raw": "var(--x)"}), typography keys are CSS property names ("font-size", not fontSize), box-shadow offsets nest under values, gradients use colors: [{color, stop}]. When unsure, check style-settings.md — do not guess shapes.
- Responsive grammar —
setting:breakpoint:pseudo with colons: _padding:tablet_portrait, _background:hover, _margin:mobile_portrait:hover. Default breakpoint keys: tablet_portrait (991), mobile_landscape (767), mobile_portrait (478). Desktop is the bare key.
- Units are strings —
"3rem", "100%", "24px". Bare numbers get px appended by Bricks.
- Spacing scale discipline — pick a scale (or the site's global variables) and stick to it across the design.
- Real structure, no filler — semantic
tag settings on sections/blocks (header, nav, article, aside, footer), one h1 per page, descending heading levels.
- Global classes ride along — any id listed in an element's
_cssGlobalClasses must have its full class object in the top-level globalClasses array.
- Don't invent settings keys — only keys documented in the references or found in the Bricks source. Unknown keys are silently ignored and waste the user's trust.
Validation Checklist (run before delivering)
1---2name: bricks3description: Author Bricks Builder (WordPress) layouts, templates, and full designs as paste-ready JSON. Use for any Bricks task — sections, pages, headers/footers, query loops, ACF/dynamic data, faceted filters, conditions, interactions/animations, popups, WooCommerce templates, custom elements, or hooks. Verified against Bricks 2.3.6 source.4---56# Bricks Builder JSON Authoring78Generate complete Bricks designs as JSON that pastes or imports cleanly on the first try.910## Default Deliverable1112Produce an actual `.json` file in the workspace (not inline JSON) unless the user asks otherwise. Use the project's folder convention if one exists; otherwise `bricks-json/{type}-{slug}.json`. In the final response state: the file path, which JSON format you used, and the validation checks performed.1314## Workflow15161. **Pick the format** — clipboard paste vs template import vs programmatic insert → [references/json-formats.md](references/json-formats.md)172. **Plan structure** — semantic section → container → blocks tree; pick elements from the catalog → [references/elements.md](references/elements.md)183. **Style with settings** — every `_` style key and its exact value shape → [references/style-settings.md](references/style-settings.md)194. **Wire data** — dynamic tags, query loops, filters as needed (see routing table)205. **Validate** — checklist below, then deliver2122## Format Quick Reference2324**Clipboard (paste into builder)** — the default for sections and page content:2526```json27{28 "content": [ /* flat array of element nodes */ ],29 "source": "bricksCopiedElements",30 "sourceUrl": "https://example.com",31 "version": "2.3.6",32 "globalClasses": [ /* full class objects referenced by _cssGlobalClasses */ ],33 "globalElements": []34}35```3637**Element node** (every entry in `content`):3839```json40{41 "id": "abc123",42 "name": "heading",43 "parent": "xyz789",44 "children": [],45 "settings": {},46 "label": "Optional structure-panel label"47}48```4950- `id`: unique 6-char alphanumeric. `parent`: parent's id, or `0` for root elements.51- The array is **flat** — hierarchy lives entirely in `parent` + `children` (ids must cross-reference exactly).52- Root elements are usually `section`; never nest a `section` inside anything.5354## Task Routing5556| Task | Reference |57|------|-----------|58| Format selection, clipboard/template/meta storage, programmatic insert | [references/json-formats.md](references/json-formats.md) |59| Element catalog, per-element settings, nestables | [references/elements.md](references/elements.md) |60| Style keys, value shapes (color/typography/border/shadow/gradient/transform), responsive + hover grammar | [references/style-settings.md](references/style-settings.md) |61| Section/grid/flex recipes, cards, overlays, sticky, full designs | [references/layout-recipes.md](references/layout-recipes.md) |62| Dynamic data tags `{post_title}`, args, `{echo:}` | [references/dynamic-data.md](references/dynamic-data.md) |63| ACF (incl. repeaters, groups, flexible content), Meta Box, JetEngine, Pods, CMB2 | [references/acf-providers.md](references/acf-providers.md) |64| Query loops (`hasLoop` + `query`), post/term/user queries | [references/query-loops.md](references/query-loops.md) |65| Faceted filters, AJAX pagination, load more, infinite scroll, live search | [references/query-filters.md](references/query-filters.md) |66| Show/hide conditions (`_conditions`) | [references/conditions.md](references/conditions.md) |67| Interactions, animations, scroll triggers (`_interactions`) | [references/interactions.md](references/interactions.md) |68| Popups (templates, triggers, limits, AJAX) | [references/popups.md](references/popups.md) |69| Template types, conditions, import/export, header/footer/archive/404 | [references/templates.md](references/templates.md) |70| Components, global classes, global variables, color palette | [references/components-classes.md](references/components-classes.md) |71| Theme styles, breakpoints, CSS generation order | [references/theme-styles.md](references/theme-styles.md) |72| Form element, actions, validation | [references/forms.md](references/forms.md) |73| WooCommerce templates and elements | [references/woocommerce.md](references/woocommerce.md) |74| PHP: custom elements with controls | [references/custom-elements.md](references/custom-elements.md) |75| PHP: filters and actions | [references/hooks.md](references/hooks.md) |76| Asset loading, builder permissions | [references/assets-permissions.md](references/assets-permissions.md) |7778Ready-to-paste examples (hero, grids, ACF loops, filtered archive, header/footer, popup…): [patterns/](patterns/) — see [patterns/INDEX.md](patterns/INDEX.md).7980## Non-Negotiable Rules81821. **Flat tree integrity** — every `children` id exists as a node whose `parent` points back. No orphans, no duplicates.832. **Verified value shapes only** — colors are objects (`{"hex": "#222"}` or `{"raw": "var(--x)"}`), typography keys are CSS property names (`"font-size"`, not `fontSize`), box-shadow offsets nest under `values`, gradients use `colors: [{color, stop}]`. When unsure, check style-settings.md — do not guess shapes.843. **Responsive grammar** — `setting:breakpoint:pseudo` with colons: `_padding:tablet_portrait`, `_background:hover`, `_margin:mobile_portrait:hover`. Default breakpoint keys: `tablet_portrait` (991), `mobile_landscape` (767), `mobile_portrait` (478). Desktop is the bare key.854. **Units are strings** — `"3rem"`, `"100%"`, `"24px"`. Bare numbers get `px` appended by Bricks.865. **Spacing scale discipline** — pick a scale (or the site's global variables) and stick to it across the design.876. **Real structure, no filler** — semantic `tag` settings on sections/blocks (`header`, `nav`, `article`, `aside`, `footer`), one `h1` per page, descending heading levels.887. **Global classes ride along** — any id listed in an element's `_cssGlobalClasses` must have its full class object in the top-level `globalClasses` array.898. **Don't invent settings keys** — only keys documented in the references or found in the Bricks source. Unknown keys are silently ignored and waste the user's trust.9091## Validation Checklist (run before delivering)9293- [ ] JSON parses (`python3 -m json.tool file.json` or equivalent)94- [ ] Every `parent`/`children` reference resolves; ids unique, 6-char alphanumeric95- [ ] `source: "bricksCopiedElements"` + `version` present (clipboard format)96- [ ] Every `_cssGlobalClasses` id has a matching object in `globalClasses`97- [ ] Value shapes match style-settings.md (spot-check colors, typography, spacing)98- [ ] Responsive keys use valid breakpoint names99- [ ] Query loops: `hasLoop: true` + `query.objectType` present; filters point at a real query element id via `filterQueryId`100- [ ] Dynamic data tags exist for the stated field provider (e.g. `{acf_*}` matches the user's field names)