Contributing
Work on Vinyl UI locally.
Vinyl UI is MIT-licensed and contributions are welcome.
Repository layout
packages/
tokens/ @vinyl-ui/tokens — src/tokens.ts → web.css, native.css, palette.css, shadcn.json, JS
effects/ @vinyl-ui/effects — effects.css + X.tsx (web) / X.native.tsx (native), built with tsdown
registry/ shadcn registry sources: registry/web/ui, registry/native/ui, registry.{web,native}.json
apps/
docs/ this site (Fumadocs + Next.js static export on Cloudflare Pages); serves /r/{web,native}
playground-native/ Expo app that renders every native component and effectGetting started
pnpm install
pnpm build # tokens → effects → registry → docs
pnpm test # token contrast + effects tests
pnpm typecheck
pnpm lint- Docs:
pnpm --filter docs dev→ http://localhost:3000 - Native playground:
pnpm --filter playground-native start, then pressi/a, or open it in Expo Go.
Adding a component
- Write
packages/registry/registry/web/ui/<name>.tsxandregistry/native/ui/<name>.tsx. Keep the same variant names and props where the platform allows. - Import utilities as
@/registry/<platform>/lib/utilsand siblings as@/registry/<platform>/ui/<x>. The shadcn CLI rewrites these to the user's aliases. - Add the item to
registry.web.jsonandregistry.native.json, listing npmdependenciesand@vinyl/*registryDependencies. - Add a preview in
apps/docs/components/preview.tsx, a page incontent/docs/components, and render it in the native playground. - Run
pnpm build && pnpm typecheck.
Releasing
Published packages (@vinyl-ui/tokens, @vinyl-ui/effects) are versioned with
Changesets:
pnpm changeset # describe your changeMerging to main opens a release PR. Merging that PR publishes to npm with provenance.
Docs and registry hosting
The docs site is a Next.js static export (apps/docs/out) hosted on Cloudflare Pages (project
vinyl-ui, see apps/docs/wrangler.toml). The shadcn registry is served from the same site at
/r/web/* and /r/native/*.
.github/workflows/deploy-docs.ymlbuilds and runswrangler pages deployon every push tomain(production) and on pull requests (preview URL). It needs theCLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDrepository secrets.- Manual deploy:
pnpm turbo run build --filter=docs && pnpm --filter docs deploy. - Local preview of the production build on the Pages runtime:
pnpm --filter docs start.