Thanks for your interest in contributing. Issues, bug reports, and pull requests are all welcome.
src/lib/is the library itself. Each component has one folder containing the framework wrappers (React*.tsx, Solid*.solid.tsx, Preact*.preact.tsx, Vue*.vue, Svelte*.svelte, and vanilla*.ts) and a shared*Vanilla.tsengine where the canvas/WebGL logic lives.src/app/is the documentation site (Next.js 16, Tailwind v4), deployed to Cloudflare Workers.src/components/demos/holds the interactive demos shown in the docs.scripts/build-registry.mtsgenerates the shadcn-compatible registry inpublic/r/fromsrc/lib. It runs automatically beforedevandbuild.
npm install
npm run dev-
Run the checks:
npx tsc --noEmit npm run lint npm run build
-
If you touched a component in
src/lib, verify its demo page still works in the docs, including the WebGL overlay fallback (the path taken when html-in-canvas is unavailable, which is what most browsers use today). -
Keep changes focused. One component or one fix per PR is easiest to review.
- The vanilla engine owns all rendering logic. Framework wrappers should stay thin.
- Every component must work both with html-in-canvas (live DOM texture) and as a plain WebGL overlay fallback.
- WebGL canvases composite with premultiplied alpha. Shaders must output
rgb * alphaand contexts usepremultipliedAlpha: true. Never un-premultiply in a shader. - Test in Safari as well as Chrome. Safari is the strictest about alpha compositing and video decoding.
Please include your browser and version, whether the html-in-canvas flag is enabled, and steps to reproduce. A short screen recording helps a lot for visual glitches.