React Styled Components
Cursor rules for React development with Styled Components integration.
Awesome CursorRulesv10 स्टार · 0 फ़ोर्क · 0 रचना≈267 टोकन
// React + Styled Components .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// Styled Components best practices
const styledComponentsBestPractices = [ "Use the styled-components/macro for better debugging", "Implement a global theme using ThemeProvider", "Create reusable styled components", "Use props for dynamic styling", "Utilize CSS helper functions like css`` when needed", ];
// Folder structure
const folderStructure = src/ components/ styled/ styles/ theme.js globalStyles.js pages/ utils/;
// Additional instructions
const additionalInstructions = `
- Use proper naming conventions for styled components (e.g., StyledButton)
- Implement a consistent theming system
- Use CSS-in-JS for all styling needs
- Utilize styled-components' attrs method for frequently used props
- Implement proper TypeScript support for styled-components
- Use the css prop for conditional styling when appropriate
- Follow the styled-components documentation for best practices `;