Skip to content

slide source file

A single slide: a list of positioned, animatable elements plus its scroll behavior.

Fields

Field Type Default Description
title string required Human-readable slide title, shown in navigation UI.
scroll_range number | "auto" "auto" Total scrollable distance in abstract scroll units, or 'auto' (default) for content-driven height where the slide grows to fit its rendered content. Keyframe 'at' values and snap positions reference this range (when numeric). A slide with scroll_range=0 has no scroll behavior.
initial_scroll_position number 0 Scroll position the slide starts at on first visit. Must be within [0, scroll_range].
font_scale number 1.0 Font size multiplier for the slide. 1.0 = inherit. Must be > 0.
scroll_speed number 1.0 Scroll speed multiplier. Values > 1 scroll faster, < 1 scroll slower.
easing "linear" "linear" Easing function for scroll-driven animation. Currently only 'linear' is supported.
snap_positions array [] Scroll positions where the view settles after scrolling stops. Values must be within [0, scroll_range].
reverse boolean false Reverses the scrollbar direction so the slide reads bottom-up. When false (default), scroll value 0 places the scrollbar thumb at the TOP of the track and the user scrolls DOWN to advance through the slide — the conventional direction. When true, scroll value 0 places the thumb at the BOTTOM of the track, the thumb rises as the scroll value increases, and the user scrolls UP to advance. Authoring values are UNCHANGED in either mode: keyframe at values, snap_positions, and initial_scroll_position are still interpreted in the usual [0, scroll_range] range, with at=0 rendering the slide's initial state regardless of reverse. Only the scrollbar's value-to-thumb-position mapping and the sign of user-input deltas (wheel, shift+arrows, chevrons, drag) are flipped at render time. Intended for naturally bottom-up content (e.g. git-tree visualizations) so authors can keep keyframes and image lists in their natural ascending order rather than writing them in reverse.
elements array required The elements in this slide, rendered in array order (first = bottom, last = top).

Each entry in elements is one of the element types — see Element schemas.

Example

{
  title: "Intro",
  elements: [
    {
      // Multi-line content uses JSON5 line continuations (\ at end of line).
      markdown: "# Hello\n\
\n\
Welcome to the deck.",
      position: [10, 10],
      width: 80,
    },
  ],
}