Animation¶
scrolly animates by scroll position, not by time. As the reader scrolls through a slide, each element's properties interpolate between keyframes you place along the scroll range.
Keyframes¶
An animatable property is given as a set of keyframes — pairs of (scroll position, value) — and scrolly interpolates between them piecewise-linearly. Between the first and last keyframe the value moves; outside that span it holds.
The animatable properties are:
position— where the element sits within the slideanchor— the reference point for position, scaling, and rotationopacity— fade in and outscale— grow and shrinkangle— rotatewidthandheight— resize each dimension independently
Scroll-position units¶
Keyframe positions are expressed in the slide's
scroll_range units. Keyframes outside
[0, scroll_range] are allowed; scrolly build --strict and
scrolly validate --strict warn about them so you can catch
accidental out-of-range values.
Worked patterns¶
See Recipes / How-to for concrete animation patterns — parallax backgrounds, incremental build-ups, and filmstrips.