Communitygithub.com

whoamnesia/lottie-rive

Lottie and Rive by astudio: integrating, controlling and optimising designer-made animation in products - dotLottie/Lottie playback, segments, scroll-driven and interactive Lottie, runtime theming, size optimisation; Rive state machines (inputs, transitions, listeners), data binding with view models, events, runtimes for web, React, React Native, iOS, Android, Flutter; choosing Lottie vs Rive vs code; preparing files for handoff (After Effects + Bodymovin, Figma Motion, Lottie Creator, Cavalry exports). Use for "Lottie", ".lottie", "Bodymovin", "Rive", ".riv", "state machine animation", "interactive illustration", "анимированная иконка из After Effects", "встроить анимацию от дизайнера".

What is lottie-rive?

lottie-rive is a Claude Code agent skill that lottie and Rive by astudio: integrating, controlling and optimising designer-made animation in products - dotLottie/Lottie playback, segments, scroll-driven and interactive Lottie, runtime theming, size optimisation; Rive state machines (inputs, transitions, listeners), data binding with view models, events, runtimes for web, React, React Native, iOS, Android, Flutter; choosing Lottie vs Rive vs code; preparing files for handoff (After Effects + Bodymovin, Figma Motion, Lottie Creator, Cavalry exports). Use for "Lottie", ".lottie", "Bodymovin", "Rive", ".riv", "state machine animation", "interactive illustration", "анимированная иконка из After Effects", "встроить анимацию от дизайнера".

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/whoamnesia/motion-3d/tree/HEAD/skills/lottie-rive

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

astudio · Lottie & Rive

Role: Senior Motion Designer & Creative Developer at astudio.one (15+ years) - designer-made animation that ships crisp, small and interactive. Bar: <root>/reference/studio-bar.md; <root> = two levels above this skill's base directory, or the folder holding scripts/motion.cjs.

Choose the format

NeedPick
a designer-made linear animation (icon, illustration, onboarding scene, empty state) played/paused/segmentedLottie (.lottie via dotLottie runtime)
interactive, stateful animation that reacts to input or app data (buttons with states, characters, progress, game UI, data-driven illustrations)Rive (state machines + data binding)
simple UI state changes, hover/press, transitionsCSS/Motion (astudio-motion:ui-motion) - no file needed
logo/icon you can draw in SVG and animate in codeSVG + GSAP (astudio-motion:svg-motion) - export Lottie only if an app runtime needs it
video-like content (people, footage)video (<video>), not Lottie

Lottie workflow (references/lottie.md)

  1. Prefer .lottie (zip, 60-80% smaller, bundles images/themes/state machines) + @lottiefiles/dotlottie-web (canvas + WASM) or @lottiefiles/dotlottie-react; lottie-web only for legacy SVG-renderer needs.
  2. Control: play/pause/stop/setSpeed/setMode/setFrame/setSegment, events load/complete/frame; segment-based "state machines" (play the checked segment, then loop idle).
  3. Scroll: map scroll progress to setFrame; interactivity without wiring via @lottiefiles/lottie-interactivity.
  4. Theme at runtime (brand colours, dark mode) via dotLottie themes/slots - don't ship two files.
  5. Optimise: remove hidden layers/unused assets, no raster images unless necessary, fewer masks/mattes/effects (unsupported or slow), trim to the visible frame range, check the file size (< 50-100KB for icons).
  6. Accessibility: role="img" + aria-label; pause under reduced motion (show a meaningful static frame via setFrame); no autoplay loops > 5s without a pause control.

Rive workflow (references/rive.md)

  1. In the editor: artboards, timelines, a state machine (states, transitions with conditions, inputs: boolean/number/trigger, listeners for pointer events), view models for data binding (string/number/color/ enum/trigger/list properties bound to scene properties), events for app callbacks.
  2. Runtime: @rive-app/react-canvas (useRive, useStateMachineInput, useViewModel, useViewModelInstance*), @rive-app/canvas for vanilla, native runtimes for iOS/Android/Flutter/RN; WebGL2 renderer for heavy scenes.
  3. Drive it from app data (data binding) instead of a pile of inputs; listen to Rive events for app reactions.
  4. Preload critical files; size the canvas with useRive's layout (Fit, Alignment); pause off-screen.

Look

node <root>/scripts/motion.cjs strip page.html --duration <s> renders a page hosting the Lottie/Rive file (clock mode drives their rAF loops). Check the first and last frames, segment boundaries, and colours after theming.

Handoff notes for designers

  • AE -> Lottie: Bodymovin/LottieFiles plugin; supported: shape layers, transforms, trim paths, masks (limited), text (prefer outlined), precomps; avoid expressions-heavy rigs, effects, 3D layers, blending modes.
  • Figma Motion exports MP4/GIF/SVG/WebM and code (CSS/React/motion.dev) - for Lottie use Lottie Creator or the LottieFiles plugin. Cavalry exports Lottie natively.
  • Name layers meaningfully (they become selectors for theming and debugging); deliver .lottie with themes.

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

whoamnesia/gsap

GSAP motion by astudio: timelines, ScrollTrigger scroll storytelling (pin, scrub, horizontal galleries, parallax), SplitText headline reveals, Flip layout transitions, MorphSVG/DrawSVG/MotionPath, Draggable/Inertia/Observer, CustomEase, quickTo cursor followers, Lenis smooth scroll, page transitions (Barba, View Transitions) and award- style landing-page motion in vanilla JS, React (useGSAP), Next.js, Vue, Nuxt, Svelte and Astro - with cleanup, responsive and reduced-motion handling via gsap.matchMedia. Use for "GSAP", "ScrollTrigger", "scroll animation", "pinned section", "horizontal scroll", "text reveal", "как на Awwwards", "анимация при скролле", "параллакс". All GSAP plugins are free (GSAP 3.13+).

whoamnesia/motion-review

Motion review and audit by astudio: reviews animation code and rendered motion against a strict craft bar, audits a whole codebase's motion, diagnoses jank and performance, finds where motion is missing (opportunities) and removes motion that should not exist - for websites, product UI, GSAP/Motion/CSS, Lottie/Rive, three.js and rendered videos. Use for "review my animations", "why is this janky", "this feels cheap/slow/AI-made", "audit the motion", "where should we add animation", "remove unnecessary animations", "проверь анимации", "почему дёргается", "аудит моушена". Default to flagging; approval is earned. Outputs a findings table and a Block/Approve verdict, with rendered strips as evidence.

whoamnesia/ui-motion

Interface animation by astudio: builds motion for UI components and flows - buttons, dropdowns, popovers, tooltips, modals, drawers, toasts, accordions, tabs, lists, skeletons, route/page transitions, shared-element morphs, drag and gestures - with CSS (@starting-style, scroll-driven animations), WAAPI, View Transitions, Motion (motion.dev / framer-motion) in React, Vue, Svelte or plain HTML; defines motion systems and tokens; implements Figma Motion designs via the Figma MCP (get_motion_context). Use for "animate this component", "add a transition", "make it feel alive/smooth/native", "page transition", "motion tokens", "микроанимации", "анимация интерфейса", "плавные переходы". Decides whether something should animate at all before writing code.

Related Skills