Skip to main content

Section Definitions

Section definitions are the component library — reusable types that templates reference.

Creating a Definition

POST /api/v1/admin/sdui/section-definitions
{
"type": "HeroSection",
"name": "Hero Section",
"description": "Full-width hero banner with CTA buttons",
"category": "layout",
"platforms": "ALL",
"maxBlocks": 3,
"settings": [
{
"id": "title",
"type": "TEXT",
"label": "Title",
"defaultValue": "Welcome"
},
{
"id": "bgColor",
"type": "COLOR",
"label": "Background Color",
"defaultValue": "#FFFFFF"
},
{
"id": "bgImage",
"type": "IMAGE",
"label": "Background Image"
}
],
"blocks": [
{
"type": "Button",
"name": "CTA Button",
"limit": 2,
"settings": [
{
"id": "label",
"type": "TEXT",
"label": "Label",
"defaultValue": "Click Me"
},
{
"id": "variant",
"type": "SELECT",
"label": "Style",
"defaultValue": "primary",
"options": [
{ "value": "primary", "label": "Primary" },
{ "value": "secondary", "label": "Secondary" }
]
}
]
}
]
}

Setting Types

TypeDescriptionExample
TEXTSingle-line textTitle, label
TEXTAREAMulti-line textDescription
RICHTEXTHTML contentBody text
NUMBERInteger/decimalColumn count
RANGESliderOpacity
CHECKBOXBoolean toggleShow/hide
SELECTDropdownStyle variant
COLORColor picker#1a1a2e
IMAGEImage URLBanner image
VIDEOVideo URLBackground video
URLLink URLCTA link
HTMLRaw HTMLEmbed code