This is a template for building React component libraries that are styled with TailwindCSS and bundled with tsdown. For more information on the tooling, or to follow a guide on setting this up yourself, check out my article.
- React 19
- Fast and tiny builds thanks to tsdown
- Optional Preact branch
- TailwindCSS 4
- Optional DaisyUI branch
- ESLint and prettier pre-configured
- Vitest for unit tests
- GitHub actions for testing and releasing
To use this template, click the "Use this template" button above, or run the following command:
pnpm dlx degit bosh-code/tsdown-react-tailwind-template my-react-library
cd my-react-library
# or for Preact, etc...
pnpm dlx degit bosh-code/tsdown-react-tailwind-template#templates/preact my-preact-library
cd my-preact-library- Install dependencies:
pnpm install- Run the playground:
pnpm playground- Build the library:
pnpm build- Build in watch mode:
pnpm dev- Run the unit tests:
pnpm test