Scrollytelling block
A type: scrollytelling block: one map plus an ordered list of chapters that drive the camera and layer visibility as the reader scrolls. For narrative and examples see Writing a story file.
Type: "scrollytelling" · Required
Block type
Type: string · Required
Unique block identifier
className
Section titled “className”Type: string
CSS class name for container
Type: string
Inline CSS styles for container
config
Section titled “config”Type: object · Required
Map configuration with MapLibre options
Same shape as config.
Type: "light" | "dark" · Default: "light"
Visual theme
showMarkers
Section titled “showMarkers”Type: boolean · Default: false
Show the chapter rail: a column of dots beside the story, one per chapter, that jump to it (not markers on the map)
markerColor
Section titled “markerColor”Type: string
Fill color of the chapter rail’s dots. Default: white dots with a dark outline, the current one larger and filled dark, which stand out on any basemap
cameraOffset
Section titled “cameraOffset”Type: boolean · Default: true
Offset the camera so each chapter’s center is not under its card (false: centre it in the whole map)
layers
Section titled “layers”Type: object[] · Default: []
Persistent layers (visible throughout story)
Each entry: see the Layers reference.
chapters
Section titled “chapters”Type: object[] · Required · Min items: 1
Story chapters
Path: chapters[].id · Type: string · Required
Unique chapter identifier
Path: chapters[].title · Type: string · Required
Chapter title
center
Section titled “center”Path: chapters[].center · Type: [number, number] · Required
Map center [longitude, latitude]
Path: chapters[].zoom · Type: number · Required
Zoom level
description
Section titled “description”Path: chapters[].description · Type: string
Chapter text as HTML (markdown is not converted)
Path: chapters[].image · Type: string · Pattern: ^(?:[hH][tT][tT][pP][sS]?:\/\/|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
Hero image: an http(s) URL or a site path such as /images/photo.jpg
Path: chapters[].video · Type: string · Pattern: ^(?:[hH][tT][tT][pP][sS]?:\/\/|\/|\.\.?\/|[^\s:/?#][^:/?#]*(?:[/?#]|$))
Video: an http(s) URL or a site path such as /videos/clip.mp4
Path: chapters[].pitch · Type: number · Default: 0 · Range: 0 to 85
Camera pitch angle (0-85)
bearing
Section titled “bearing”Path: chapters[].bearing · Type: number · Default: 0 · Range: -180 to 180
Camera bearing (-180 to 180)
Path: chapters[].speed · Type: number · Default: 0.6 · Range: 0 to 2
Animation speed multiplier (0-2)
Path: chapters[].curve · Type: number · Default: 1 · Range: 0 to 2
Animation curve (0=linear, 1=default, 2=steep)
animation
Section titled “animation”Path: chapters[].animation · Type: "flyTo" | "easeTo" | "jumpTo" · Default: "flyTo"
Animation type
rotateAnimation
Section titled “rotateAnimation”Path: chapters[].rotateAnimation · Type: boolean
Enable continuous rotation animation
spinGlobe
Section titled “spinGlobe”Path: chapters[].spinGlobe · Type: boolean
Slowly pan the camera westward while this chapter is active (paused under prefers-reduced-motion). Globe projection itself is the map-level projection:
alignment
Section titled “alignment”Path: chapters[].alignment · Type: "left" | "right" | "center" | "full" · Default: "center"
Content alignment
hidden
Section titled “hidden”Path: chapters[].hidden · Type: boolean · Default: false
Hide chapter content (map-only)
padding
Section titled “padding”Path: chapters[].padding · Type: number | object
Camera padding in pixels for this chapter, used as written instead of the automatic offset that keeps center clear of the card
Path: chapters[].padding.top · Type: number · Default: 0 · Minimum: 0
Pixels kept clear at the top
Path: chapters[].padding.right · Type: number · Default: 0 · Minimum: 0
Pixels kept clear on the right
bottom
Section titled “bottom”Path: chapters[].padding.bottom · Type: number · Default: 0 · Minimum: 0
Pixels kept clear at the bottom
Path: chapters[].padding.left · Type: number · Default: 0 · Minimum: 0
Pixels kept clear on the left
layers
Section titled “layers”Path: chapters[].layers · Type: object
Layer visibility control
Path: chapters[].layers.show · Type: string[] · Default: []
Layer IDs to show
Path: chapters[].layers.hide · Type: string[] · Default: []
Layer IDs to hide
onChapterEnter
Section titled “onChapterEnter”Path: chapters[].onChapterEnter · Type: object[] · Default: []
Actions when entering chapter
action
Section titled “action”Path: chapters[].onChapterEnter[].action · Type: string · Required
Action type
Allowed values: setFilter, setPaintProperty, setLayoutProperty, flyTo, easeTo, fitBounds, custom
Path: chapters[].onChapterEnter[].layer · Type: string
Target layer ID
property
Section titled “property”Path: chapters[].onChapterEnter[].property · Type: string
Property name (for setPaintProperty/setLayoutProperty)
Path: chapters[].onChapterEnter[].value · Type: any
Property value
filter
Section titled “filter”Path: chapters[].onChapterEnter[].filter · Type: array | null
Filter expression (for setFilter, null to clear)
bounds
Section titled “bounds”Path: chapters[].onChapterEnter[].bounds · Type: [number, number, number, number] | [[number, number], [number, number]] | number[]
Bounds for fitBounds: [west, south, east, north] or [[west, south], [east, north]]
options
Section titled “options”Path: chapters[].onChapterEnter[].options · Type: map of any
Additional options
onChapterExit
Section titled “onChapterExit”Path: chapters[].onChapterExit · Type: object[] · Default: []
Actions when exiting chapter
Each entry has the same shape as chapters[].onChapterEnter[].
callback
Section titled “callback”Path: chapters[].callback · Type: string
Custom callback function name
footer
Section titled “footer”Type: string
Footer content (HTML)
Type: string
The map’s name, read out by screen readers as its accessible name (default: “Map”, or locale Map.Title)
description
Section titled “description”Type: string
What the map shows, in a sentence or two — its text alternative, read by screen readers as the map’s description
sources
Section titled “sources”Type: map of object
Map sources
Same shape as sources.
controls
Section titled “controls”Type: object
Map controls
Same shape as controls.
legend
Section titled “legend”Type: object | false
The story’s legend: pinned in one corner, above the chapter cards. A story with a classify: layer gets one automatically; false turns it off
position
Section titled “position”Path: legend.position · Type: "top-left" | "top-right" | "bottom-left" | "bottom-right"
Legend corner. Default: top-left, or top-right on a wide screen whose cards are all on the left
Path: legend.title · Type: string
Legend title
collapsed
Section titled “collapsed”Path: legend.collapsed · Type: boolean | "auto" · Default: "auto"
Start collapsed to a Legend button (true), open (false), or auto: collapsed on phones and where cards pass the legend’s corner, open elsewhere
Path: legend.items · Type: object[]
Custom legend items (overrides layer legends)
Same shape as legend.items.
Type: map of object
Runtime-tunable values, readable from expressions via global-state
Same shape as state.
parameters
Section titled “parameters”Type: map of object
Presentation metadata for state keys — label, type, range
Same shape as parameters.
markers
Section titled “markers”Type: object[]
Standalone markers — DOM pins live, symbol layers + sprite on export
Same shape as markers.
popups
Section titled “popups”Type: object[]
Standalone popups open at a coordinate — no layer, no marker
Same shape as popups.
images
Section titled “images”Type: map of string | object
Named images for symbol layers and patterns — loaded live, merged into the sprite on export
Same shape as images.
terrain
Section titled “terrain”Type: object
3D terrain from a raster-dem source — setTerrain live, style.json terrain on export
Same shape as terrain.
Type: object
Sky, fog, and globe atmosphere — setSky live (maplibre-gl >= 4.5), style.json sky on export
Same shape as sky.
projection
Section titled “projection”Type: object
Map projection (globe needs maplibre-gl >= 5) — style.json projection on export
Same shape as projection.
Type: object
The style-spec light shading fill-extrusion faces — map.setLight live, style.json light on export
Same shape as light.