Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
**文件来源:** PatrickJS/awesome-cursorrules → `rules/react-chakra-ui-cursorrules-prompt-file.mdc`
**原仓库:** https://github.com/PatrickJS/awesome-cursorrules
**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)
把 `react-chakra-ui-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for React development with Chakra UI integration.
globs: **/*
alwaysApply: false
---
// React + Chakra UI .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// Chakra UI best practices
const chakraUIBestPractices = [
"Use ChakraProvider at the root of your app",
"Utilize Chakra UI components for consistent design",
"Implement custom theme for brand-specific styling",
"Use responsive styles with the Chakra UI breakpoint system",
"Leverage Chakra UI hooks for enhanced functionality",
];
// Folder structure
const folderStructure = `
src/
components/
pages/
theme/
index.js
foundations/
components/
hooks/
utils/
`;
// Additional instructions
const additionalInstructions = `
1. Use TypeScript for type safety with Chakra UI components
2. Implement proper component composition using Chakra UI
3. Utilize Chakra UI's built-in accessibility features
4. Use the 'as' prop for semantic HTML rendering
5. Implement dark mode using Chakra UI's color mode
6. Use Chakra UI's layout components for responsive design
7. Follow Chakra UI best practices for performance optimization
`;
有问题或建议,在本 skill 下留言。
把 `react-chakra-ui-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for React development with Chakra UI integration.