Netlify's Million Developers microsite is built as a Vue app organized around one oversized SVG. The notes below cover how that SVG was split into components, how GreenSock drives the motion, how an animation toggle works, and how the artwork was made screen-reader-friendly.
Decomposing the SVG into Components
Working in SVG means reasoning about a coordinate system of x, y, width and height. Because SVGs can be nested, a child SVG only needs those four values defined to be mounted inside the parent — which is how the microsite's pieces are placed and repositioned.
<div id="app">
<app-login-result-sticky v-if="user.number" />
<app-github-corner />
<app-header />
<!-- this is one big SVG -->
<svg id="timeline" xmlns="http://www.w3.org/2000/svg" :viewBox="timelineAttributes.viewBox">
<!-- this is the desktop path -->
<path
class="cls-1 timeline-path"
transform="translate(16.1 -440.3)"
d="M951.5,7107..."
/>
<!-- this is the path for mobile -->
<app-mobilepath v-if="viewportSize === 'small'" />
<!-- all of the stations, broken down by year -->
<app2016 />
<app2017 />
<app2018 />
<app2019 />
<app2020 />
<!-- the 'you are here' marker, only shown on desktop and if you're logged in -->
<app-youarehere v-if="user.number && viewportSize === 'large'" />
</svg>
</div>
The app component holds the header; everything beneath it is a single large SVG. That SVG was divided into roughly three kinds of components:
- Two sets of candyland-style paths, one for desktop and one for mobile, switched by a value in the Vuex store.
- 27 stations (their text labels handled separately) plus a large amount of decoration — bushes, trees, streetlamps — grouped by year so no single component became unmanageable.
- A "you are here" marker, rendered only on desktop and only when the visitor is logged in.
Inside the `
<template>
<g>
<!-- decorative components -->
<app-tree x="650" y="5500" />
<app-tree x="700" y="5550" />
<app-bush x="750" y="5600" />
<!-- station component -->
<app-virtual x="1200" y="6000" xSmall="50" ySmall="15100" />
<!-- text component, with slots -->
<app-text
x="1400"
y="6500"
xSmall="50"
ySmall="15600"
num="20"
url-slug="jamstack-conf-virtual"
>
<template v-slot:date>May 27, 2020</template>
<template v-slot:event>Jamstack Conf Virtual</template>
</app-text>
...
</template>
<script>
...
export default {
components: {
// loading the decorative components in syncronously
AppText,
AppTree,
AppBush,
AppStreetlamp2,
// loading the heavy station components in asyncronously
AppBuildPlugins: () => import("@/components/AppBuildPlugins.vue"),
AppMillion: () => import("@/components/AppMillion.vue"),
AppVirtual: () => import("@/components/AppVirtual.vue"),
},
};
...
</script>
Scroll-Driven Animation with GSAP
Animation uses GreenSock (GSAP) with its ScrollTrigger plugin. The shared setup imports gsap, the plugin and relevant Vuex state. Rather than configuring every component individually, the `toggleActions` and `start` settings live in the store and are passed down, which made it easy to experiment with trigger points during development.
import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger.js";
import { mapState } from "vuex";
gsap.registerPlugin(ScrollTrigger);
export default {
computed: {
...mapState([
"toggleConfig",
"startConfig",
"isAnimationDisabled",
"viewportSize",
]),
},
...
methods: {
millionAnim() {
let vm = this;
let tl;
const isScrollElConfig = {
scrollTrigger: {
trigger: `.million${vm.num}`,
toggleActions: this.toggleConfig,
start: this.startConfig,
},
defaults: {
duration: 1.5,
ease: "sine",
},
};
}
},
mounted() {
this.millionAnim();
},
};
The stored configuration pauses animations when they leave the viewport (a small performance benefit) and declines to retrigger them in reverse when the user scrolls back up. The start setting fires an animation once the center of its element is 90% down the viewport height.
export default new Vuex.Store({
state: {
toggleConfig: `play pause none pause`,
startConfig: `center 90%`,
}
}
Banner animations, which do not depend on scroll, take a different path: a prop switches which config is applied, based on the numeric prop supplied.
if (vm.num === 1) {
tl = gsap.timeline({
defaults: {
duration: 1.5,
ease: "sine",
},
});
} else {
tl = gsap.timeline(isScrollElConfig);
}
Each animation is anchored to a label on its timeline — a marked point on the playhead that other animations or functions can hang from. The number prop feeds the label as well, keeping the header and footer timelines separate.
tl.add(`million${vm.num}`)
...
.from(
"#front-leg-r",
{
duration: 0.5,
rotation: 10,
transformOrigin: "50% 0%",
repeat: 6,
yoyo: true,
ease: "sine.inOut",
},
`million${vm.num}`
)
.from(
"#front-leg-l",
{
duration: 0.5,
rotation: 10,
transformOrigin: "50% 0%",
repeat: 6,
yoyo: true,
ease: "sine.inOut",
},
`million${vm.num}+=0.25`
);
One isolated example illustrates the technique: two legs swing independently, repeat several times, and use `yoyo: true` so GSAP reverses the animation on every other alternation. The realism comes from `transformOrigin` starting at the center-top of each leg, so the rotation pivots on the knee axis.
A Toggle for Disabling Motion
Visitors with vestibular disorders can switch animation off entirely. The toggle itself is unremarkable — it commits a mutation that updates `isAnimationDisabled` in the Vuex store.
export default new Vuex.Store({
state: {
...
isAnimationDisabled: false,
},
mutations: {
updateAnimationState(state) {
state.isAnimationDisabled = !state.isAnimationDisabled
},
...
})
The actual work happens in the topmost App component, which holds all animations and triggers. A `watch` on `isAnimationDisabled` grabs every ScrollTrigger instance in the app, then either jumps each one to its final frame (animations off) or resets progress to 0 (animations back on). Calling .kill() was rejected because the animations could not then be restarted, and calling `.restart()` would have played everything at once instead of letting each animation fire as the user scrolled. Setting progress directly gave both behaviors.
watch: {
isAnimationDisabled(newVal, oldVal) {
ScrollTrigger.getAll().forEach((trigger) => {
let animation = trigger.animation;
if (newVal === true) {
animation && animation.progress(1);
} else {
animation && animation.progress(0);
}
});
},
},
Making SVG Artwork Accessible
The outer SVG that contains everything is deliberately given no role, so a screen reader traverses into it. Decorative elements such as trees and bushes get role="img" so they are skipped. Each detailed station carries a unique id, a title as its first child element and role="presentation".
<svg
...
role="presentation"
aria-labelledby="analyticsuklaunch"
>
<title id="analyticsuklaunch">Launch of analytics</title>
In testing with VoiceOver on a laptop, the site's pertinent information was reachable, the SVG text announced itself while tabbing, the link was found and all text was read aloud. Text inside the SVG comes through the slotted text component; the SVG being covered by that component is shown above.
<template>
<a
:href="`https://www.netlify.com/blog/2020/08/03/netlify-milestones-on-the-road-to-1-million-devs/#${urlSlug}`"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="450"
height="250"
:x="svgCoords.x"
:y="svgCoords.y"
viewBox="0 0 280 115.4"
>
<g :class="`textnode text${num}`">
<text class="d" transform="translate(7.6 14)">
<slot name="date">Jul 13, 2016</slot>
</text>
<text class="e" transform="translate(16.5 48.7)">
<slot name="event">Something here</slot>
</text>
<text class="e" transform="translate(16.5 70)">
<slot name="event2" />
</text>
<text class="h" transform="translate(164.5 104.3)">View Milestone</text>
</g>
</svg>
</a>
</template>
The source code is available in the Netlify GitHub repository for anyone who wants to inspect it or open a pull request, and the microsite itself is live.



