React Component Builder

Generate well-typed React components with TypeScript

intermediate
codingreacttypescriptcomponents

Prompt Template

Create a React component for: {description}

Requirements:
- TypeScript with proper typing
- {styling} for styling
- Responsive design
- Accessibility (ARIA labels, keyboard nav)
- Props interface with JSDoc comments

Include:
1. Component code
2. Props interface
3. Usage example
4. Story/test example

Variables

{description}

Example: a filterable data table with sorting and pagination

{styling}

Example: Tailwind CSS

Example Output

```tsx
interface DataTableProps<T> {
  /** Array of data items to display */
  data: T[];
  /** Column definitions */
  columns: Column<T>[];
  ...
}
```

Tips

  • Specify the styling approach
  • Mention if it needs to work with a specific UI library

More Prompts