Animate multiple SVGs together
Once a page has more than one animated element, the problem stops being the animation and becomes coordination — three separate observers means three slightly different start times, which reads as sloppy. scrollDrawGroup binds any number of containers to a single scroll timeline so they move as one, with one observer rather than one per element.
The code
A team-messaging product's home page. Three feature illustrations live in three separate cards, but one scrollDrawGroup call gives them one trigger and one set of options, so they ink in exactly together.
import { scrollDrawGroup } from 'svg-scroll-draw/group';
// Three cards, three SVGs — one call, one trigger
const art = document.querySelectorAll('.feature-art');
const group = scrollDrawGroup([...art], {
trigger: { start: 'top 85%', end: 'top 40%' },
easing: 'ease-out',
speed: 1.1,
stagger: 0.04,
once: true,
});
// later: group.replay(), group.destroy()
Team messaging that keeps work in one place
Relay
Related examples
MIT licensed, zero runtime dependencies. Every API is a separate entry point, so you only ship what you import. Full API reference →