# Motionary 17.0.1 > Motionary is a zero-dependency motion library: scroll animations, 200+ presets and 209 animated Web Components () that work in plain HTML and every framework, plus motionary/runtime — its own tween/timeline engine and format loaders. Install: `npm i motionary` · CDN: https://unpkg.com/motionary@17/dist/components.umd.js (+ https://unpkg.com/motionary@17/dist/widgets.umd.js for 6.x+ widgets) · Manifest: https://harrisoncn.github.io/Motionary/components.json · Full text: https://harrisoncn.github.io/Motionary/llms-full.txt Rules for using a component: (1) import its define function from `import.path` and call it once (or load the CDN bundle); (2) if `requires` is non-empty, install / import / register the prerequisites first (see the component's Prerequisites); (3) then use the tag in HTML. ## Runtime modules - [motionary/runtime](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/core.md): Shared ticker (one rAF loop), tween + timeline engine with easing, module registry with clear errors. - [motionary/runtime/format-css](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-css.md): Import CSS @keyframes text or live CSSKeyframesRule objects and Web Animations API keyframes (array or property-indexed) into a runtime timeline. - [motionary/runtime/format-motion](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-motion.md): Play Motion / Framer-style { initial, animate, transition } JSON (arrays as keyframes, times, repeatType, springs) with the runtime. - [motionary/runtime/scroll](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/scroll.md): Scroll-linked scenes: start / end rules, scrub (direct or smoothed), pin, markers, enter / leave callbacks and per-edge actions for a runtime tween or timeline. - [motionary/runtime/format-svg](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-svg.md): Replay SVG SMIL animations (animate, set, animateTransform, animateMotion) on the runtime timeline, morph between any two paths, and measure paths without the DOM. - [motionary/runtime/text](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/text.md): Split text into characters (grapheme-aware), words and lines for animation while keeping it accessible (aria-label with the full text, pieces hidden from assistive tech). - [motionary/runtime/format-sprite](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-sprite.md): Play TexturePacker / Aseprite sprite sheets and numbered image sequences on a canvas or an element background, as runtime timelines (scrubbable). - [motionary/runtime/smooth](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/smooth.md): Smooth, inertial wheel scrolling (lerp or fixed-duration glide) for the window or any scroll container, anchor links that glide, off under prefers-reduced-motion; real scroll events keep scroll scenes and observers working. - [motionary/runtime/format-gif](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-gif.md): Decode animated GIFs (own LZW decoder, no DOM) into composited RGBA frames and play / scrub / reverse them on a canvas as a runtime timeline. - [motionary/runtime/format-apng](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-apng.md): Split animated PNGs into standalone frame PNGs (decoded by the browser), composite them (dispose / blend) and play them on a canvas as a runtime timeline. - [motionary/runtime/format-webp](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-webp.md): Split animated WebP files (ANIM / ANMF) into standalone frames (decoded by the browser), composite them (blend / dispose) and play them on a canvas as a runtime timeline. - [motionary/runtime/gl](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gl.md): A small WebGL2 renderer with its own API: scene graph, camera, lights, box / plane / sphere / torus, PBR-style materials, shader materials, image and video textures, orbit controls — not a Three.js clone. - [motionary/runtime/format-gltf](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-gltf.md): Load glTF 2.0 (.gltf with external or data: buffers, .glb) into motionary/runtime/gl nodes: node hierarchy, meshes, PBR metallic-roughness materials, embedded / external images. - [motionary/runtime/format-obj](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-obj.md): Load Wavefront OBJ (+ MTL materials and diffuse textures) into motionary/runtime/gl nodes: polygons triangulated, groups, per-material meshes. - [motionary/runtime/vector](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/vector.md): Plays Lottie (bodymovin JSON) and dotLottie (.lottie) files on Canvas 2D with Motionary’s own renderer (no lottie-web code): shapes, gradients, trim paths, masks, track mattes, precomps, images; a runtime timeline you can seek, reverse and scrub. - [@rive-app/canvas](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/rive.md): The official MIT-licensed Rive runtime, used by to play .riv files (artboards, animations, state machines with inputs). Optional peer dependency: lazy-loaded on first use, never bundled into Motionary. - [motionary/runtime/physics](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/physics.md): A small 2D rigid-body engine written for Motionary (own implementation and API — no Matter.js / Box2D code): circles, boxes and convex polygons, mass from density, restitution, friction, sensors, collision groups, sleeping, distance / spring / pin constraints, pointer drag, a fixed time step on the shared ticker. - [motionary/runtime/format-scene](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-scene.md): The versioned motionary-scene@1 format: a JSON description of a 2D physics scene (world, named materials, bodies, constraints, per-body style) — validate, migrate older drafts, load into a physics world and save one back. - [motionary/runtime/drag-snap](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/drag-snap.md): Pointer drag along one axis with velocity tracking, inertial throws, rubber-band edges and spring-animated snap points on the shared ticker — the engine of , usable for sheets, sliders and pickers (own implementation). - [motionary/runtime/gltf-anim](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gltf-anim.md): Plays glTF 2.0 animations on models loaded by motionary/runtime/format-gltf: translation / rotation / scale / weights channels with LINEAR, STEP and CUBICSPLINE samplers, skins (4 joints per vertex) and morph targets, deformed on the CPU and re-uploaded to motionary/runtime/gl (own implementation). - [motionary/runtime/lottie-state](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/lottie-state.md): Resolves Lottie slots with dotLottie themes (Color / Scalar / Vector / Text rules, static or keyframed) and runs a subset of dotLottie state machines (playback states, Event / Numeric / String / Boolean guards, pointer + completion interactions, input / theme / frame actions) for motionary/runtime/vector — own implementation, used by . - [motionary/runtime/gltf-decoders](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gltf-decoders.md): Lets motionary/runtime/format-gltf load KHR_draco_mesh_compression meshes and KHR_texture_basisu (KTX2) textures through the official decoders — Google draco3d and the Basis Universal transcoder — registered as lazy loaders; Motionary does not reimplement them. - [draco3d](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/draco3d.md): Google’s official Draco geometry decoder (Apache-2.0, WASM / JS), used by motionary/runtime/gltf-decoders for KHR_draco_mesh_compression meshes. Optional peer dependency: lazy-loaded when the first Draco file is opened, never bundled into Motionary. - [basis_transcoder.js](https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/basis-transcoder.md): Binomial’s official Basis Universal transcoder (Apache-2.0, basis_transcoder.js + .wasm from the basis_universal repository), used by motionary/runtime/gltf-decoders for KHR_texture_basisu (KTX2) textures. Optional: lazy-loaded when the first KTX2 texture is decoded, never bundled into Motionary. ## Components - `` (motionary/components/transitions): Smooth expand / collapse for native
— semantics, keyboard and find-in-page kept; no wrapper elements. - `` (motionary/components/background): Windows Fluent materials: frosted acrylic (backdrop blur + tint + noise) and mica. Solid fallback when transparency is reduced. - `` (motionary/components/widgets): 7.3: a buy button — the product photo flies on an arc into the cart, the cart badge bumps and the button morphs into a ✓ “Added” state. Works with ` (motionary/components/page): A fixed page-wide layer: drifting particles, falling snow, twinkling stars, film grain or a gradient that shifts with scroll. - `` (motionary/components/svg): Stroke icons that move: the bell rings, the heart beats, the check draws, the gear turns. Hover, click, in view or loop; decorative unless labelled. - `` (motionary/components/effects): 5.6: renders a toggle (a user gesture starts Web Audio), detects beats and plays any registered effect on children with data-usa-beat="effect". JS: - `` (motionary/components/background): A slow drifting gradient mesh behind its content. Transforms only, paused off-screen, still under reduced motion. - `` (motionary/components/layout): Wrap a list or grid: items that are added fade in, removed ones fade out in place, and everything else glides to its new spot — on sort, filter or resize. Zero - `` (motionary/components/page): Set loading and every heading, paragraph, image and button inside becomes a shimmering placeholder of its own size — no extra markup. - `` (motionary/components/ui): Overlapping avatars that spread apart with a spring on hover; extras collapse into “+N”. - `` (motionary/components/page): Appears after you scroll, shows reading progress as a ring and springs the page back up, then moves focus to the top. - `` (motionary/components/ui): Count or dot badge that bumps with a spring when its value changes; 99+ capping, optional pulse. - `` (motionary/components/widgets): 7.5: an achievement grid — locked badges are grey with a 🔒; unlock(name) flips a badge to its colour side with a shine and the “n / m unlocked” counter updates - `` (motionary/components/widgets): 7.2: bars grow from the baseline in a stagger on first view and new data glides every bar to its new height — bars that appear grow in, bars that leave shrink a - `` (motionary/components/widgets): 9.3: a background generator — pick a palette and a style (mesh gradient, grain, stripes, dots), shuffle the seed and copy the CSS. - `` (motionary/components/background): Soft colour blobs that slowly morph and drift — a fluid gradient backdrop. - `` (motionary/components/ui): A draggable sheet with snap points, inertia and drag-down-to-dismiss — the iOS / Android pattern for web and Windows web-view apps. - `` (motionary/components/click): Spring-driven button click deformation: squash & stretch, elastic border-radius wobble, gooey liquid droplets, and a dent toward the pressed point. Combine them - `` (motionary/components/cards): Ten card effects you can combine (effect="lift sheen"): flip (hover or click, x/y axis), holo, glass, border-glow, conic-border, lift, spotlight, sheen, paralla - `` (motionary/components/cards): A deck where the top card swipes away left or right (pointer, touch, arrow keys) and the next springs forward. loop sends cards to the back. - `` (motionary/components/widgets): 6.2: swipe, drag, arrow keys, dots and autoplay (pauses on hover, focus, off screen). Four transitions — slide, fade, scale and a 3D "cards" coverflow. Reduced - `` (motionary/components/cards): Items on a 3D ring, rotated by drag, arrow keys, clicks or autoplay — with spring motion. Reduced motion shows one flat item at a time. - `` (motionary/components/widgets): 7.3: a cart button with a count badge and a drawer that slides in from the side — lines slide in (or bump their quantity), removed lines collapse, the badge bum - `` (motionary/components/widgets): 9.1: chapter navigation for long-form stories — one entry per chapter with a reading-progress bar that fills as you scroll, the current chapter highlighted, cli - `` (motionary/components/widgets): 7.8: an AI chat input that grows with its text; Enter sends, the send button pops when there is text and morphs into Stop while busy, with a thinking glow runni - `` (motionary/components/feedback): The circle draws itself, then a check, cross or exclamation strokes in with a pop. Great after a payment or upload. - `` (motionary/components/click): Form-associated checkbox: the box springs and the check draws itself; indeterminate state, circle shape. - `` (motionary/components/click): Wrap anything: ripple, burst (circle, star, heart, emoji), confetti, squish, press-spring and error shake — combinable, keyboard-friendly, optional haptics. - `` (motionary/components/widgets): 8.0: a pause / speed bar for the unified motion clock — pause, slow down or speed up every Motionary animation and frame loop on the page at once (motionClock i - `` (motionary/components/widgets): 8.9 low-code: shows copy-paste code (HTML, React, Vue or JSON) for a live, configured component next to it, follows its attribute changes and copies with one cl - `` (motionary/components/widgets): 6.9: a saturation / brightness square and a hue strip with spring-follow thumbs (both keyboard sliders), a preview chip that morphs to the new colour and swatch - `` (motionary/components/widgets): 7.9: a ⌘K command palette on the native — scales in, filters as you type with fuzzy matching and highlighted letters, results stagger in and a highligh - `` (motionary/components/widgets): 6.5: drag the handle (or hover with the hover attribute), click to jump, or use the keyboard slider; horizontal or vertical; an intro sweep plays once when it s - `` (motionary/components/widgets): 7.3: a split-flap countdown to a date (to) or for a number of seconds — every digit flips when it changes; fires usa:done at zero. The timer label updates once - `` (motionary/components/text): Counts up to a number when visible, locale-formatted with tabular digits. Set .value to animate live dashboards. - `` (motionary/components/depth): Up to six children become the faces of a CSS 3D cube. Drag / swipe, arrow keys, autoplay or show("top"); spring-driven, the front face is the only one exposed t - `` (motionary/components/widgets): 6.5: slides sit on adjacent faces of a 3D cube that turns between them — swipe, arrow keys, buttons or autoplay (pauses on hover / focus / off screen); turn aro - `` (motionary/components/page): A spring-lagged ring, a magnetic ring that wraps buttons and links, or a soft glow following the pointer. Mouse / pen only. (6.0: for a comet tail use the comet - `` (motionary/components/widgets): 6.9: months slide in from the direction of travel, the chosen day pops inside a spring circle, today has a ring. A real date grid: arrows, PageUp / PageDown, Ho - `` (motionary/components/depth): Layers with data-depth (-1…1) shift and scale by depth as the pointer moves, the phone tilts (source="orientation") or the page scrolls; optional whole-scene ro - `` (motionary/components/transitions): Animated modal, side drawers and bottom sheet on the native : top layer, focus trap, Esc, backdrop click. - `` (motionary/components/widgets): 6.2: native
that spring open and closed (height + fade) with an overshooting chevron; one open at a time unless multiple. Find-in-page and keyboard ke - `` (motionary/components/webgl): The image bulges and splits into RGB around the pointer. Without WebGL (or a cross-origin image without CORS) it falls back to a gentle CSS zoom. - `` (motionary/components/widgets): 6.6: items magnify with a smooth cosine falloff as the pointer moves along the dock, neighbours make room, labels pop above the hovered item and a click bounces - `` (motionary/components/background): A dot grid that swells and links up with lines around the pointer. - `` (motionary/components/dotlottie; requires motionary/runtime/vector + motionary/runtime/lottie-state): 10.9: plays .lottie files with their themes (slots recoloured by a theme from the file) and state machines — playback states, event / numeric / boolean guards, - `` (motionary/components/click): Double tap or double click a photo to pop a heart (or any emoji) at the tap point. L for keyboard users. - `` (motionary/components/physics): Drag with mouse, touch, pen or arrow keys. spring-back returns home with a wobble; inertia glides after a flick; snap to a grid or points; rubber-band bounds. - `` (motionary/components/svg): Every stroke of the SVG inside draws itself — on view, hover, click or scrubbed with scroll — staggered between shapes, optional fill afterwards. No getTotalLen - `` (motionary/components/ui): A side panel that springs in, drags / swipes closed, traps the page behind a backdrop and returns focus on close. Left, right, top or bottom. - `` (motionary/components/widgets): 7.1: one vertical slider per band with springy caps and a smooth response curve drawn through them; presets glide every band to its gain. - `` (motionary/components/ui): A floating action button whose actions fan out with a staggered spring: up, down, left, right or radial. - `` (motionary/components/widgets): 8.1: an announcement banner with an ambient festive scene behind the text — lunar lanterns and sparkles, Christmas lights and snow, Halloween bats and moon, or - `` (motionary/components/widgets): 7.7: a text input whose label floats up on focus, with a growing underline; validates on blur — invalid shakes and slides the message in, valid draws a check. s - `` (motionary/components/widgets): 6.9: dragging files over it lights marching-ants borders and lifts the icon; dropped (or browsed) files fly into a list with progress bars that end in a drawn c - `` (motionary/components/page): Full-screen sections that snap one at a time, with keyboard paging, dot navigation and a usa:section event. - `` (motionary/components/fx): plays any registered effect on its child: pulse, pop, jelly, wiggle, heartbeat, bounce, flash (≤ 2 per second), tada, shake. Click the button. - `` (motionary/components/widgets): 7.2: a semicircular gauge — the needle swings to the value on a damped spring (overshoot, settle), the arc fills in the colour of its zone and the number counts - `` (motionary/components/widgets): 9.3: seeded generative art on a canvas — flow fields, circle packing, Truchet tiles or layered waves in curated palettes; it draws itself in on screen and a tap - `` (motionary/components/effects): 5.7: plays any registered effect on a fling (fast release), a two-finger twist or a long press that charges --usa-charge 0 → 1. JS: bindGesture - `` (motionary/components/widgets): 8.7: a multi-touch sticker — drag with one finger, pinch with two to scale and twist to rotate, all at once, with a lifted shadow while held (wheel / Shift + wh - `` (motionary/components/gl-model; requires motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/gltf-decoders + draco3d + basis_transcoder.js): 10.9: for compressed glTF — Draco meshes and KTX2 (Basis Universal) textures decoded by the official decoders (Google draco3d, Binomial’s Basis U - `` (motionary/components/widgets; requires motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj + motionary/runtime/gltf-anim): 10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel, - `` (motionary/components/text): An RGB-split, sliced glitch — always on or on hover. - `` (motionary/components/widgets): 7.6: an SVG globe in orthographic projection — graticule, pulsing markers, spins while on screen, drag to turn it, flyTo(name) brings a city round to the front. - `` (motionary/components/widgets): 10.5 (WebGPU effects 2.0): tens of thousands of particles simulated by a WebGPU compute shader and drawn as instanced quads — swirl, galaxy or fountain, pointer - `` (motionary/components/text): Text filled with a multi-colour gradient that keeps flowing. - `` (motionary/components/background): An SVG-noise grain overlay — no image to ship. animated makes it jitter like film. - `` (motionary/components/background): A line grid behind the content that lights up around the pointer. - `` (motionary/components/widgets): 8.7: a 3D card that tilts with the phone’s gyroscope (and with the pointer on desktop), with a moving glare and layers that float at different depths. - `` (motionary/components/text): The text draws itself stroke by stroke, then fills in — signatures, hero words. - `` (motionary/components/widgets): 9.4: a full-bleed hero with a background video — poster first, cross-fade to the video, a readable scrim, an always-there pause button and an optional scroll-sc - `` (motionary/components/click): Press and hold (pointer, Space or Enter) while a ring fills; releasing early rewinds. For destructive actions. - `` (motionary/components/widgets): 8.4: a sci-fi HUD panel — angled corners, a glowing frame that draws itself in when the panel scrolls into view, a header with a blinking status light, and data - `` (motionary/components/widgets): 8.0: server-rendered children animate in on hydration — hidden only while JS is on and not yet upgraded (ssrHead() in the head, 3 s CSS fallback), then staggere - `` (motionary/components/click): Icons that morph point-by-point with a spring: play ↔ pause, menu ↔ close, plus ↔ minus, check, arrow. toggle makes it a button with per-icon labels. - `` (motionary/components/widgets): 10.1: one-click install snippet with npm / pnpm / yarn / bun / CDN tabs and a copy button that confirms with a check; `cdn` sets the URL of the CDN tab. - `` (motionary/components/widgets): 6.8: drag cards between columns — the card lifts and tilts toward the drag, a placeholder opens where it will land and the other cards glide aside (FLIP). Full - `` (motionary/components/widgets): 6.9: a compact timeline for JSON — drag a bar to move a track, drag its edge to resize, scrub the playhead or press play; exports format use-scroll - `` (motionary/components/widgets): 7.2: the value counts up keeping prefix, suffix and decimals ("$12.4k", "98.2%"), the delta chip slides in with an arrow coloured by sign, and an optional trend - `` (motionary/components/widgets): 7.5: a ranked list — when scores change, rows glide to their new rank, climbers flash green with ▲n and fallers red with ▼n, scores roll and the top three get m - `` (motionary/components/click): A heart that pops with a spring and bursts into particles; aria-pressed, optional count. - `` (motionary/components/webgl): Click or tap to send water ripples through the image; hover adds a gentle wobble. The plain image stays when WebGL is unavailable. - `` (motionary/components/widgets): 8.3: a navigation bar whose active indicator is a drop of liquid — it stretches like a droplet towards the next item and settles with a wobble (gooey SVG filter - `` (motionary/components/page): A slim NProgress-style bar for route changes and fetches: loadingBar.start() trickles, done() completes and fades. - `` (motionary/components/widgets): 7.6: a place card with a stylised mini map — the route from the origin draws itself, the pin drops in with a bounce and a ring pulses; distance computed with ha - `` (motionary/components/widgets): 9.2: plays Lottie (After Effects / bodymovin) files without lottie-web — vector layers render as SVG and their keyframes run as native animations on Motionary’s - `` (motionary/components/widgets): 9.2: an animated icon set shipped as tiny Lottie files — heart beat, bell swing, check draw-in, spinner, star twinkle, bolt zap — on click, hover, enter or loop - `` (motionary/components/widgets; requires motionary/runtime/vector): 10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and - `` (motionary/components/widgets): 7.1: LRC or [data-t] lines; the active line glows, scrolls to the centre and a highlight sweeps across it while past lines dim. Follows an