How to Build a React + TailwindCSS Library with tsdown

Build a React + TailwindCSS component library with tsdown Originally published at bosher.co.nz Learn how to build tiny, reusable React component libraries styled with TailwindCSS and bundled superfast with tsdown - all with minimal configuration. What you'll build: A production-ready React component library with TailwindCSS styling, complete with a playground Time to complete: 45-60 minutes Skill level: Intermediate (familiarity with React, node and npm packages recommended) AI Disclaimer: This article was written entirely by myself, a human. However, LLMs were used to help with grammar and spelling checks. TL;DR - Quick Setup Here's the express version if you're already familiar with the concepts: Create a project: pnpm dlx create-tsdown@latest your-project-name -t react Add react and react/jsx-runtime to the external array in tsdown.config.ts Install dependencies: pnpm add -D tailwindcss @bosh-code/tsdown-plugin-inject-css @bosh-code/tsdown-plugin-tailwindcss Configure the plugins in your tsdown config Add @import "tailwindcss"; to src/i https://lnkd.in/g-7-xAKn

To view or add a comment, sign in

Explore content categories