Эта страница пока недоступна на выбранном языке (Русский), поэтому показана на английском.
Page-builder blocks
How pages are stored as block JSON, which block types exist, and what adding a new block involves (a core change, not a plugin).
Every website page is a stack of blocks saved as JSON on the page translation (blocks Json // Block[]). src/components/blocks/BlockRenderer.tsx paints them; the visual builder (/admin/pages/[id], /admin/design/layouts) edits them on a live same-origin canvas. There are 33 block types today, grouped as hero, content, proof, commerce, blog, contact and layout — from hero, features, faq, pricing and cta to the system blocks productGrid, blogList, cartSummary and checkoutForm, plus marketWidget (“Marketplace widget”), which paints a widget installed from the marketplace.
[
{
"type": "hero",
"eyebrow": "Dubai's trusted fit-out partner",
"heading": "Beautiful spaces, built right.",
"primaryCta": { "label": "Get a free quote", "href": "/quote" },
"secondaryCta": { "label": "WhatsApp us", "href": "whatsapp" },
"variant": "split"
},
{
"type": "faq",
"heading": "Questions",
"category": "general",
"limit": 6,
"columns": 2,
"hidden": false
}
]- Shared flags (
BlockBase):hiddenkeeps a block in the JSON without painting it;idis the builder's stable id (ignored by the public renderer). - A CTA
hrefofwhatsappopens WhatsApp with a greeting;telcalls. - System layouts (blog home, post, shop, product, cart, checkout) are reserved pages whose blocks wrap the dynamic core.
marketWidget block.What a new block type involves (core change)
Add an interface
XBlock extends BlockBase { type: "x"; … }and add it to theBlockunion insrc/lib/blocks/types.ts.Add a
BLOCK_CATALOGentry:type,label,description,groupanddefaults(what the builder inserts).Add a component and a
case "x"inpaint()ofsrc/components/blocks/BlockRenderer.tsx.Ship it through the built-in module pipeline: export the owning module zip (
npm run module:pack <id>[/<sub>]), edit, import & rebuild.
Written from: src/lib/blocks/types.ts, src/lib/blocks/README-builder.md, src/components/blocks/BlockRenderer.tsx, docs/PLUGIN-DEVELOPER-GUIDE.md, docs/MODULES.md, src/lib/help/articles.ts, docs/DEVELOPERS/WIDGET-SPEC.md