ContributionGuidelines
TweenLabs is a community-driven, open-source GSAP component library. Whether you're adding a new animation, fixing a bug, or improving docs — every contribution makes this library better for everyone.
{
id: "23",
name: "Your Animation",
componentName: "YourAnimation",
route: "/components/YourAnimation",
bgColor: "bg-wtf-green",
textColor: "text-white",
description: "Describe it here.",
tiltClass: "tilt-left",
}Add one entry → your animation appears in the gallery, sidebar, and code page.
Local Development Setup
Fork the Repository
Clone & Enter
git clone https://github.com/YOUR_USERNAME/TweenLabs.git
cd TweenLabsInstall with pnpm
pnpm installThis repo uses a pnpm lockfile. Do not use npm or yarn — it will break the lock file and conflict with CI.
Start the Dev Server
Adding a New Component
Every animation must be 100% self-contained inside its own folder. No shared imports. No cross-component dependencies.
Create Your Folder & Page
src/app/(main)/components/YourAnimation/
└── page.tsx ← your entire animation lives here- No imports from other route directories
- No custom classes from
globals.css— use inline Tailwind - No custom theme values — use exact hex:
bg-[#e55b3c]notbg-wtf-orange - Sub-components go inside the same
page.tsx - Assets go in
/public/as absolute paths, or use inline SVGs
Register in components.ts
src/data/components.ts:{
id: "23", // next sequential number
name: "Your Animation", // display name
componentName: "YourAnimation", // PascalCase — must match folder
route: "/components/YourAnimation",
bgColor: "bg-wtf-green", // see palette below
textColor: "text-white",
description: "One sentence describing what this animation does.",
tiltClass: "tilt-left",
}componentName must match your folder name exactly (case-sensitive). A mismatch causes a 404 and breaks the sidebar link.
bgColor options:
GSAP Standards
useGSAP()from@gsap/react— never rawuseEffect- Always pass a scope ref:
{ scope: containerRef } - Register plugins at file top, not inside hooks
- Use
contextSafe()for callbacks that touch state/refs - Clean up timelines and listeners on unmount
Contribution Workflow
Create a Feature Branch
git checkout -b feat/your-animation-nameBuild & Verify in Browser
/components/YourAnimation and appears in the sidebar and gallery at /components.Validate — Required
pnpm lint
pnpm buildPRs that fail CI, have TypeScript errors, or contain ESLint warnings will not be merged. Fix all warnings before opening a PR.
Commit
git commit -m "feat: add [your animation name]"feat: for new components · fix: for bugs · docs: for documentation.Push & Open PR
git push origin feat/your-animation-namemaster. Include a short GIF or screenshot of your animation in the PR description.Good First Contributions
- Add inline comments explaining GSAP logic
- Test on mobile/tablet — report layout bugs
- Create variants with different easing curves
- Add prefers-reduced-motion support
- Fix typos or improve docs
- Report broken routes or console errors
Code Guidelines
- Use transforms (
x,y,scale) — not layout props - Respect
prefers-reduced-motion - TypeScript only — no
anytypes - Descriptive conventional commit messages
- One animation concept per component
- Comment complex timelines & ScrollTriggers
Code of Conduct
Be kind and constructive. We're here to learn and build something great together. Discriminatory, harassing, or disrespectful behavior will not be tolerated in issues, PRs, or any community interaction.
Ready to ship?
Built in public.
Animated with love. Open to all.