Plasmic Cursor Rules — Free Cursor Rules Template
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityExtensionsTrending
    CursorRulesPlasmic Cursor Rules
    Back to Rules
    Frontend

    Plasmic Cursor Rules

    April 15, 2026
    0 copies 0 downloads

    This is a set of rules that outlines the best practices and architecture principles to create Plasmic-compatible code:

    Rule Content
    This is a set of rules that outlines the best practices and architecture principles to create Plasmic-compatible code:
    
    Plasmic-Specific Guidelines
    
    - Build reusable components for Plasmic Studio, not pages
    - Pass as much UI work as possible to Plasmic Studio
    - For repeatable components, use string/number props over slots
    - Use slot components for images when possible; apply default styles with ".element image" selectors
    - Use DataProvider only when exposing data to Plasmic Studio is necessary
    - Use the Plasmic state feature if you need to listen to or propagate changes
    
    Component Registration
    
    - Register all components in plasmic-host.tsx
    - Import components at the top of the file
    - Use registerComponent with proper configuration (see Plasmic docs)
    - Set appropriate name and displayName
    - Use importPath with @/ prefix only in codegen mode (if loader library is absent)
    - Provide default values for required props
    - Add descriptive comments for each prop
    - By default, registerComponent includes a className prop for root styles (do not add it explicitly)
    
    Props Configuration
    
    - Use type: "class" for all className props (never "string")
    - For eventHandler props, include argTypes: []
    - Use these types for props:
      - "string" for text
      - "number" for numbers
      - "boolean" for toggles
      - "imageUrl" for images
      - "array" for collections
      - "eventHandler" for callbacks
      - "slot" for customizable content
      - "class" for styles
    
    Naming Conventions
    
    - PascalCase: Components, Types, Interfaces
    - kebab-case: directories, file names (e.g., auth-wizard, user-profile.tsx)
    - camelCase: variables, functions, methods, hooks, props
    - UPPERCASE: environment variables, constants
    - Prefix event handlers with 'handle' (e.g., handleClick)
    - Prefix booleans with verbs (e.g., isLoading, hasError)
    - Prefix custom hooks with 'use' (e.g., useAuth)
    - For style props, use suffix ClassName (e.g., titleClassName)
    - For event handlers, use prefix on (e.g., onClick)
    
    Styling Guidelines
    
    - Use CSS modules (e.g., ComponentName.module.css)
    - Design mobile-first and responsively
    - Include hover states and transitions for interactive elements
    - Add fallback styles for missing content (e.g., no-image state)
    - Ensure color contrast accessibility
    - Maintain consistent spacing
    - Define CSS variables for theme colors and spacing
    - Use Plasmic's registerToken/tokens for CSS variable integration
    - Pass className for root element to allow Studio style customization
    - Use classnames feature to allow Studio to override/modify child styles
    - Allow initial CSS in UI components for Studio users to extend
    
    Data & State Handling
    
    - Use DataProvider only when exposing data to Studio is needed (in case if user would need to render something using the data, like a repeatable component, or if the component itself is created to fetch the data)
    - Transform data inside the component as needed
    - Define states in registration when needed, with correct valueProps/onChangeProps/variableType
    - When using data sources (like fetching data from remote database) - use data fetching components, look up supabase example repository to see how it's done
    
    Common Mistakes to Avoid
    
    - Do not create pages; only reusable components
    - Do not use type: "string" for className props (use "class")
    - Do not use slots for repeatable components populated from data
    - Do not forget argTypes: [] for eventHandler props
    - Do not forget providesData: true when using DataProvider
    - Do not add className prop again in registration
    - Do not use app router features without confirming project structure
    - Use "dynamic" clause to load registered components that rely on heavy front-end dependencies (like google maps, etc.)

    Tags

    plasmiclow-codereactnext.js

    Comments

    More Rules

    View all

    Kechwafflesnew Cursor Rules

    C
    CODEFORYOU69

    AI DRAMA FACTORY Cursor Rules

    R
    Robert0157

    Site Cursor Rules

    R
    RaphaelVitoi

    KindnessBot Cursor Rules

    F
    foodyogi

    Neptunik Cursor Rules

    F
    fjpedrosa

    Cvcraft Cursor Rules

    C
    CedricCT

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Cursor resource

    • Build AI Agents with Think-Plan-Act Architecture Using Llama-4 Reasoningn8n · $24.99 · Related topic
    • Create a REST API for PDF Digital Signatures with Webhooksn8n · $24.99 · Related topic
    • Create a WHOIS API Interface for AI Agents with 8 Domain Management Operationsn8n · $9.99 · Related topic
    • Create Unique Jira Tickets from Splunk Alertsn8n · $9.99 · Related topic
    Browse all workflows