How to add a new animated component, synchronize the registry, and run the validation suite.
MotionFoundry is architected so outside contributors can add a new component in minutes without touching unrelated platform code:
- Create
packages/ui/src/components/<component-slug>.tsxandpackages/ui/src/styles/<component-slug>.module.css. - Export the component and its
<ComponentName>Propsinterface frompackages/ui/src/index.ts. - Add
registry/components/<component-slug>.json(description,controls,defaultProps,propsApi,a11yNotes,tailwindExample, andcollection) and runnode scripts/build-registry.mjs— it fills in the source files and regeneratesregistry/registry.jsonin export order. - Run
pnpm build:uito rebuild the package bundle, types, anddist/styles.css. - Add unit and accessibility assertions in
tests/motionfoundry.test.mjsand runpnpm test.
terminal
# Run the complete validation pipeline locallynode scripts/build-registry.mjsnode scripts/build-docs.mjsnode packages/ui/scripts/build.mjsnode packages/cli/scripts/build.mjsnode packages/cli/dist/index.mjs listnode --test tests/motionfoundry.test.mjs