SLIDER
A swipeable image slider with a page-dot indicator. Slides themselves aren't
in params — only the slider's id; WidgetCallbacks.fetchSlides(id)
fetches the actual slide list (see SlideItem).
{
"type": "SLIDER",
"params": {
"id": 1,
"height_percent": 0.3,
"padding_horizontal": 0.1,
"padding_vertical": 0.1,
"fit": "cover",
"viewport_fraction": 0.8,
"item_padding_horizontal": 5,
"autoplay": 1,
"autoplay_interval": 5
}
}
height_percent— slider height as a fraction of width (default0.3).padding_horizontal/padding_vertical— outer padding, also as a fraction of width (default0).fit— how each slide image fills its frame:"cover"(default),"contain","fill","fit_width","fit_height","scale_down"or"none". Unrecognized values fall back to"cover".viewport_fraction— fraction of the slider's width each page occupies, passed straight to the underlyingPageController(default0.8; the neighboring slide's edge peeks in). Set to1.0for one full-width slide per page.item_padding_horizontal— horizontal padding (in pixels) around each slide, i.e. the gap between adjacent slides (default5). Set to0together withviewport_fraction: 1.0for a full-bleed, edge-to-edge slider.autoplay— auto-advance the slider (1/trueor0/false; default off). Accepts a real bool,0/1, or"true"/"false". Has no effect with fewer than two slides, and stops permanently once the user drags a slide manually.autoplay_interval— seconds between auto-advances whileautoplayis on (default5; clamped to a minimum of1).
Slides follow the action/tap contract, plus two slider-only targets:
zoom— opens a full-screen, pinch-to-zoom gallery of every slide, starting at the tapped one.modal— fetches popup content viaWidgetCallbacks.fetchModaland shows it in a bottom sheet.
Renders nothing if fetchSlides isn't provided or returns an empty list.