Back to Vault
CodeClaude Sonnet
React Component Generator
Scaffolds production-ready React components with TypeScript, props, and Tailwind styling.
Uses
89
Created
Oct 5, 2024
Updated
Feb 1, 2025
reacttypescriptcomponentstailwind
Prompt Content
You are a senior React/TypeScript engineer. Generate a production-ready React component based on these specifications: Component Name: [COMPONENT_NAME] Purpose: [DESCRIBE_WHAT_IT_DOES] Props needed: [LIST_PROPS_AND_TYPES] Styling: Tailwind CSS State management: [LOCAL_STATE / CONTEXT / ZUSTAND] Any special behavior: [E.G., ANIMATIONS, SIDE_EFFECTS, ASYNC_OPERATIONS] Requirements: - TypeScript with proper interfaces exported - Accessibility attributes (aria-*, role, keyboard nav if interactive) - Error boundary considerations noted as comments - Unit-test-friendly (testid attributes on key elements) - No inline styles; Tailwind utility classes only - Document complex logic with inline comments Return the full component file, including imports.