Menu

I built a React component library with Tailwind v4, Framer Motion & typed hooks
πŸ–ΌοΈ

I built a React component library with Tailwind v4, Framer Motion & typed hooks

DEV CommunityΒ·Shubham TiwariΒ·7 months ago
#uwGdw1K7
#comments#whats#webdev#tutorial#zentauri
Reading 0:00
15s threshold

3 weeks ago I started building yet another component library.

I know, I know. The world doesn't need another one. But hear me out β€” I had a specific itch I couldn't scratch with what was already out there, and after shipping 25+ components, a set of headless hooks, and a full typography system, I think it was worth it.

This is the story of what I built, what tradeoffs I made, and what I'd do differently. Plus some code you can steal.

Why build one at all?

I kept running into the same problem on projects: I wanted Tailwind CSS v4 (not v3), Framer Motion for animated overlays and transitions, and headless browser hooks β€” all from the same package with consistent TypeScript APIs.

The options I found were:

shadcn/ui β€” great, but copy-paste model means no central updates, and you bring your own motion

Chakra UI β€” runtime theming, Emotion-based, not Tailwind-native

Radix β€” unstyled primitives; you build everything yourself

None of them gave me the combination I wanted out of the box.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.