You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 feat: Add Tailwind CSS + Shadcn UI foundation (#379)
## Overview
This PR establishes the complete foundation for migrating from
`@emotion/styled` to Tailwind CSS + Shadcn UI, with 2 components fully
converted as proof of concept.
## What's Included ✅
### Foundation (100% Complete)
- ✅ Installed Tailwind CSS v3 + PostCSS + autoprefixer
- ✅ Installed all Radix UI primitives for Shadcn components
- ✅ Created `tailwind.config.ts` with **40+ custom color mappings**
- ✅ Created `src/styles/globals.css` with Tailwind directives + global
styles
- ✅ Created `src/lib/utils.ts` with `cn()` utility for class merging
- ✅ Added Shadcn Button component
- ✅ Removed `@emotion/babel-plugin` from Vite config
- ✅ Updated App.tsx to use `globals.css`
- ✅ **Build verified working** ✨
### Converted Components (2/64 = 3%)
- ✅ `ErrorMessage.tsx` - Fully converted to Tailwind
- ✅ `ToggleGroup.tsx` - Demonstrates conditional styling with `cn()`
Both components maintain **exact visual appearance** and behavior.
## Migration Status
**Remaining work:** 62 components still using styled-components
- See `TAILWIND_MIGRATION.md` for complete breakdown
- Estimated effort: 20-30 hours of focused conversion work
## Why This Approach?
This PR provides a **stable foundation** for incremental migration:
1. **Verified working** - Build passes, types check, no runtime errors
2. **Zero breaking changes** - Emotion and Tailwind coexist peacefully
3. **Clear patterns** - Two converted components show the way forward
4. **Safe iteration** - Components can be converted one-at-a-time
## Migration Pattern
```tsx
// Before (Emotion)
const Button = styled.button<{ active: boolean }>`
color: ${props => props.active ? 'white' : 'gray'};
`;
// After (Tailwind)
<button className={cn(
"base-classes",
active ? "text-white" : "text-gray-500"
)}>
```
## Next Steps
1. Convert remaining 62 components systematically
2. Remove Emotion dependencies when 100% complete
3. Update Storybook stories
4. Full integration test pass
See `TAILWIND_MIGRATION.md` for detailed plan.
---
_Generated with `cmux`_
0 commit comments