story_map | R Documentation |
Create a scrollytelling story map
story_map(
map_id,
sections,
map_type = c("mapboxgl", "maplibre", "leaflet"),
root_margin = "-20% 0px -20% 0px",
threshold = 0,
styles = NULL,
bg_color = "rgba(255,255,255,0.9)",
text_color = "#34495e",
font_family = NULL
)
map_id |
The ID of your mapboxgl, maplibre, or leaflet output
defined in the server, e.g. |
sections |
A named list of story_section objects.
Names will correspond to map events defined within
the server using |
map_type |
One of |
root_margin |
The margin around the viewport for triggering sections by
the intersection observer. Should be specified as a string,
e.g. |
threshold |
A number that indicates the visibility ratio for a story ' panel to be used to trigger a section; should be a number between 0 and 1. Defaults to 0, meaning that the section is triggered as soon as the first pixel is visible. |
styles |
Optional custom CSS styles. Should be specified as a
character string within |
bg_color |
Default background color for all sections |
text_color |
Default text color for all sections |
font_family |
Default font family for all sections |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.