Carousel
This is the carousel component.
It takes children
as parameters. options
can also be added but are optional.
Examples
Simple carousel
{
"type": "carousel",
"children": [
{
"type": "text",
"value": "page 1",
},
{
"type": "text",
"value": "page 2",
}
]
}
Vertical scroll Carousel with enlarged center element
{
"type": "carousel",
"options": {
"aspectRatio": 2.0,
"enlargeCenterPage": true,
"scrollDirection": "vertical",
},
"children": [
{
"type": "container",
"padding": {"top": 8, "left": 8, "bottom": 8, "right": 8},
"child": {"type": "text", "value": "This is element number 1"}
},
{
"type": "container",
"padding": {"top": 8, "left": 8, "bottom": 8, "right": 8},
"child": {"type": "text", "value": "This is element number 2"}
},
]
}
Properties
Attribute | Description | Type |
---|---|---|
_type | The identifier of the component |
|
children | The children | array |
options | Element of type CarouselOptions | CarouselOptions |