Build a production-ready React component for [DESCRIBE COMPONENT].
Requirements:
- TypeScript with strict types
- Props interface with JSDoc comments
- Responsive design
- Accessible (ARIA labels, keyboard navigation, screen reader support)
- Error handling and loading states
- Unit tests (Jest + React Testing Library)
Provide:
1. Component code with proper file structure
2. Types/interfaces file
3. CSS Module or Tailwind classes
4. Storybook stories (3 variants)
5. Unit tests covering all states
6. Usage example in a parent component
Follow React best practices: custom hooks for logic, memo for performance, proper cleanup in useEffect.
Build a production-ready React component for [DESCRIBE COMPONENT].
Requirements:
- TypeScript with strict types
- Props interface with JSDoc comments
- Responsive design
- Accessible (ARIA labels, keyboard navigation, screen reader support)
- Error handling and loading states
- Unit tests (Jest + React Testing Library)
Provide:
1. Component code with proper file structure
2. Types/interfaces file
3. CSS Module or Tailwind classes
4. Storybook stories (3 variants)
5. Unit tests covering all states
6. Usage example in a parent component
Follow React best practices: custom hooks for logic, memo for performance, proper cleanup in useEffect.
How to use this prompt
Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.
Leave a Review
Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.