GRIDCN // DOCS
Contributing
Keep contributions focused and small. Follow the patterns that already exist.
Contributing to thegridcn
Thanks for taking the time. This project is a Tron: Ares inspired shadcn/ui theme system. Keep contributions focused and small.
Local setup
git clone https://github.com/educlopez/thegridcn-ui.git
cd thegridcn-ui
pnpm install
pnpm devDev server runs at http://localhost:3000.
Required:
- Node 20+
- pnpm 9+
Add a new component
- Create the file under
src/components/thegridcn/(Tron-flavored) orsrc/components/ui/(base shadcn). - Follow surrounding patterns:
"use client"only when needed,cn()for classes, norounded-2xl/rounded-3xl, 1px borders. - Register it: edit
registry.jsonat the repo root, then run:
pnpm registry:build- Add a preview entry in
src/lib/component-data.tsso it shows up in/components.
Add a new theme
- Add a
[data-theme="<name>"]block insrc/app/globals.cssnext to the existing ones. Useoklch()for all color tokens. - Export it:
pnpm tokens:buildThis regenerates public/tokens/<name>.{css,json} and the index.json manifest.
- Add the theme id to
src/components/theme/switcher options.
Commit conventions
Use Conventional Commits:
feat:new featurefix:bug fixdocs:docs onlystyle:formatting, no code changerefactor:refactor without behavior changechore:build / toolingperf:performance work
Examples:
feat: add radar sweep component
fix: resolve theme flash on first paint
docs: update install guide with tokens exampleOpening a PR
- Fork and branch from
main. - Keep PRs small and scoped. One feature or fix per PR.
- Before pushing:
pnpm lint
pnpm build- Describe the change, why it matters, and include a screenshot or short clip if it's visual.
Code style
- No comments unless the WHY is non-obvious.
- Match the surrounding file. Don't introduce new patterns in a one-liner fix.
- TypeScript strict. No
anyunless you justify it in the PR. - Prefer composition over props explosion.
- Tailwind utilities via
cn(); avoid inline style objects unless dynamic CSS vars are needed.
Reporting bugs
Open an issue with:
- Repro steps
- Expected vs actual
- Browser / Node / pnpm versions
- Minimal code sample if possible