Tailwind CSS and UI component best practices for modern web applications
Add this skill
npx mdskills install PatrickJS/cursor-tailwindComprehensive checklist of best practices but lacks actionable instructions for agents
1---2description: Tailwind CSS and UI component best practices for modern web applications3globs: **/*.css, **/*.tsx, **/*.jsx, tailwind.config.js, tailwind.config.ts4---56# Tailwind CSS Best Practices78## Project Setup9- Use proper Tailwind configuration10- Configure theme extension properly11- Set up proper purge configuration12- Use proper plugin integration13- Configure custom spacing and breakpoints14- Set up proper color palette1516## Component Styling17- Use utility classes over custom CSS18- Group related utilities with @apply when needed19- Use proper responsive design utilities20- Implement dark mode properly21- Use proper state variants22- Keep component styles consistent2324## Layout25- Use Flexbox and Grid utilities effectively26- Implement proper spacing system27- Use container queries when needed28- Implement proper responsive breakpoints29- Use proper padding and margin utilities30- Implement proper alignment utilities3132## Typography33- Use proper font size utilities34- Implement proper line height35- Use proper font weight utilities36- Configure custom fonts properly37- Use proper text alignment38- Implement proper text decoration3940## Colors41- Use semantic color naming42- Implement proper color contrast43- Use opacity utilities effectively44- Configure custom colors properly45- Use proper gradient utilities46- Implement proper hover states4748## Components49- Use shadcn/ui components when available50- Extend components properly51- Keep component variants consistent52- Implement proper animations53- Use proper transition utilities54- Keep accessibility in mind5556## Responsive Design57- Use mobile-first approach58- Implement proper breakpoints59- Use container queries effectively60- Handle different screen sizes properly61- Implement proper responsive typography62- Use proper responsive spacing6364## Performance65- Use proper purge configuration66- Minimize custom CSS67- Use proper caching strategies68- Implement proper code splitting69- Optimize for production70- Monitor bundle size7172## Best Practices73- Follow naming conventions74- Keep styles organized75- Use proper documentation76- Implement proper testing77- Follow accessibility guidelines78- Use proper version control
Full transparency — inspect the skill content before installing.