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
| Type | Description | Example |
|---|---|---|
TEXT | Single-line text | Title, label |
TEXTAREA | Multi-line text | Description |
RICHTEXT | HTML content | Body text |
NUMBER | Integer/decimal | Column count |
RANGE | Slider | Opacity |
CHECKBOX | Boolean toggle | Show/hide |
SELECT | Dropdown | Style variant |
COLOR | Color picker | #1a1a2e |
IMAGE | Image URL | Banner image |
VIDEO | Video URL | Background video |
URL | Link URL | CTA link |
HTML | Raw HTML | Embed code |