vanilla-motion
v0.1.2
Published
Copy a Vanilla Motion effect's source into your project: npx vanilla-motion add <slug>
Maintainers
Readme
Quick start
npx vanilla-motion list # every public effect, with a one-line description
npx vanilla-motion add ice-logo # → ./vanilla-motion/ice-logo/The CLI copies the files, then prints the npm packages the effect needs (if any) and how to start it:
import { mount } from "./vanilla-motion/ice-logo/ice-logo";
const fx = mount(document.querySelector("#logo"), { maxBroken: 20 });
fx.setParams({ reach: 4 }); // change params live
fx.dispose(); // remove listeners, canvases and timersEvery effect has the same shape: mount(container, options) returns { setParams, dispose }.
Usage
npx vanilla-motion add <slug> [<slug>…] [--dir <path>] [--force]
npx vanilla-motion list
npx vanilla-motion --version| Option | What it does |
|--------------------|--------------------------------------------------------------------------------------|
| --dir <path> | Where effects go (default ./vanilla-motion); each one lands in <path>/<slug>/ |
| --force | Overwrite files that already exist |
| --registry <url> | Registry root (default https://vanilla-motion.com/r); a local folder works too |
Examples:
npx vanilla-motion add ice-logo --dir src/effects
npx vanilla-motion add ripple-reveal venetian-blindFinding the right params
- Each effect page on vanilla-motion.com lists its params, defaults and ranges, with a live panel to tune them.
https://vanilla-motion.com/<slug>/skill.mdexplains the code, written for AI agents.- The Vanilla Motion MCP (
https://mcp.vanilla-motion.com/mcp) lets Claude, Cursor, ChatGPT or VS Code find an effect and wire it up for you.
shadcn
Projects that use shadcn can pull the same files from the same registry:
npx shadcn@latest add https://vanilla-motion.com/r/<slug>.jsonRelease
Publish a GitHub release tagged v<version> (e.g. v0.2.0). .github/workflows/publish.yml sets package.json to
that version, runs the tests and publishes to npm through OIDC trusted publishing (phucbm/publish-npm-action, no npm
token). The registry it reads is built by perxel/vanilla-motion
(/r/<slug>.json).
License
MIT © Perxel
