PluginBench
Rule

react components creation

via PatrickJS/awesome-cursorrules

Structured workflow for creating React components with design review and reusable pattern checks.

What is react components creation?

Guides developers through a deliberate process for building new React components, including checking for existing implementations and generating components via v0.dev. Use this rule when creating or modifying React components to ensure consistency with project structure and avoid duplication.

  • Prompts careful consideration of component purpose, functionality, and design before implementation
  • Checks existing component libraries (packages/ui and apps/spa) to prevent duplication
  • Generates detailed component specifications with TypeScript and Tailwind CSS requirements
  • Creates v0.dev links with URL-encoded prompts for rapid component generation
  • Ensures proper import paths for shadcn/ui and app-specific components
  • Enforces project structure patterns and naming conventions

Applies to

File patterns this rule matches.

**/*
Rule definition (reference)

Source of truth, from the repository.

Cursor Rules

Whenever you need a React component

  1. Carefully consider the component's purpose, functionality, and design

  2. Think slowly, step by step, and outline your reasoning

  3. Check if a similar component already exists in any of the following locations

    1. packages/ui/src/components
    2. apps/spa/src/components
  4. If it doesn't exist, generate a detailed prompt for the component, including:

    • Component name and purpose
    • Desired props and their types
    • Any specific styling or behavior requirements
    • Mention of using Tailwind CSS for styling
    • Request for TypeScript usage
  5. URL encode the prompt.

  6. Create a clickable link in this format: ComponentName

  7. After generating, adapt the component to fit our project structure:

    • Import
      • common shadcn/ui components from <ui_package_alias>@repo/ui/components/ui/</ui_package_alias>
      • app specific components from <app_package_alias>@/components</app_package_alias>
    • Ensure it follows our existing component patterns
    • Add any necessary custom logic or state management

Example prompt template: "Create a React component named {ComponentName} using TypeScript and Tailwind CSS. It should {description of functionality}. Props should include {list of props with types}. The component should {any specific styling or behavior notes}. Please provide the full component code."

Remember to replace placeholders like <ui_package_path> and <app_package_alias> with the actual values used in your project.

Related rules

Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.

**/*
41k
via PatrickJS/awesome-cursorrules

Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.

**/*
41k
via PatrickJS/awesome-cursorrules

Android development with Jetpack Compose, clean architecture, and Material Design 3.

**/*
41k
via PatrickJS/awesome-cursorrules

Angular development with Novo Elements UI library using standalone components.

**/*
41k
via PatrickJS/awesome-cursorrules

Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.

**/*
41k
via PatrickJS/awesome-cursorrules

Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.

**/*.sh +5
41k
via PatrickJS/awesome-cursorrules