--- url: /reference/items/GsapTimeline/examples.md --- # Examples ## Intro choreography The steps compose one timeline in DOM order, with `"<"` and `"-=0.2"` positions. The `timeline` option sets the defaults of every step, and one `restart()` replays the whole timeline. :::code-group ```js import { registerComponents } from '@studiometa/js-toolkit'; import { Action } from '@studiometa/ui'; import { GsapStep, GsapTimeline } from '@studiometa/ui-gsap'; registerComponents(Action, GsapTimeline, GsapStep); ``` ::: ## Pinned and scrubbed timeline The `scrollTrigger` option pins a stage inside the component and scrubs the timeline with the scroll. The third step starts at `0`, with the first one. :::code-group ```js import { registerComponents } from '@studiometa/js-toolkit'; import { GsapStep, GsapTimeline } from '@studiometa/ui-gsap'; registerComponents(GsapTimeline, GsapStep); ``` :::