Schema Copy
{
"$id": "/schema/Presentations/Stack/1.0/index.json",
"type": "object",
"title": "Stack",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"PresentationType",
"Children"
],
"properties": {
"PresentationType": {
"type": "string",
"pattern": "Stack",
"description": " A Stack widget allows you to place widgets on top of each other. This is useful for creating complex layouts with overlapping elements. The Stack positions its children relative to the edges of the container or to each other, based on their alignment."
},
"AlignmentDirectional": {
"enum": [
"Center",
"CenterEnd",
"CenterStart",
"TopCenter",
"TopEnd",
"TopStart",
"BottomCenter",
"BottomEnd",
"BottomStart"
],
"type": "string",
"description": "Defines the alignment of the children within the stack."
},
"StackFit": {
"enum": [
"Expanded",
"Cover",
"FitHeight",
"Fitwidth"
],
"type": "string",
"description": "Specifies how the children should be sized to fit within the stack."
},
"Children": {
"type": "array",
"items": {
"$ref": "/schema/shared/Widget/1.0/index.json"
},
"description": " An array of child widgets to be displayed within the stack. Each item in the array should follow the schema defined for widgets."
}
},
"examples": [
{
"PresentationType": "Stack",
"Children": [
{
"PresentationType": "Image",
"Url": "/api/file/hero.png",
"Fit": "Cover"
},
{
"PresentationType": "Positioned",
"Left": 16,
"Bottom": 16,
"Child": {
"PresentationType": "Text",
"Text": "Overlay",
"Color": "#FFFFFF"
}
}
]
}
],
"x-icon": "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"7\" y=\"7\" width=\"13\" height=\"13\" rx=\"2\"/><path d=\"M4 15V6a2 2 0 0 1 2-2h9\"/></svg>",
"x-exports": {
"html": true,
"ios": true
},
"x-family": "Presentations",
"x-name": "Stack",
"x-version": "1.0",
"x-source-package": "zero-schema"
}
{
"PresentationType": "Stack",
"Children": [
{
"PresentationType": "Image",
"Url": "/api/file/hero.png",
"Fit": "Cover"
},
{
"PresentationType": "Positioned",
"Left": 16,
"Bottom": 16,
"Child": {
"PresentationType": "Text",
"Text": "Overlay",
"Color": "#FFFFFF"
}
}
]
}