CodeVetter · Repo Unpack · Feature catalog
motiondivision/motion
The user-facing surface is primarily importable APIs consumed by application developers. React offers animated HTML and SVG components, interaction props, lazy feature loading, and motion-value hooks. Imperative APIs target values, selectors, objects, sequences, layout changes, and browser view-transition layers. Optional adapters extend the same animation machinery to Three.js and vgpu subjects.
- motion components support HTML or SVG rendering and activate animation, exit, drag, focus, hover, tap, pan, viewport, and layout features according to their props.
- animate accepts scalar values, MotionValues, elements/selectors, objects, and sequences; animateMini exposes a scoped element-animation API returning grouped playback controls.
- Sequence animation supports callback segments by replacing callbacks with subscribed MotionValues, compiling sequence definitions, and animating each resulting subject.
- The React API exports useMotionValue, useMotionTemplate, useScroll, useFollowValue, useSpring, useTransform, useVelocity, and useAnimate; MotionConfig exposes default transitions, reducedMotion, skipAnimations, nonce, and prop validation.
- scroll can deliver progress callbacks or attach playback controls to scroll progress, with axis, source/container, target, and offset-dependent behavior; inView is also exported from the DOM entrypoint.
- AnimatePresence retains removed keyed children until exit completion and supports sync or wait sequencing; LazyMotion enables synchronous or asynchronous feature bundles for lightweight m components.
- Layout APIs use layout/layoutId props or data-layout/data-layout-id attributes; view-transition builders support paired subjects, crop overrides, and nested-layer grouping, while unsupported startViewTransition still executes the DOM update.
- threeEffect binds transforms, materials, and uniforms using preRender writes; vgpuEffect supports scene and shader-related subjects and batches changed values into one set operation per subject per frame.