React Component Generator
Create a React component named $ARGUMENTS following this project's conventions.
Project Patterns
This is a Next.js 16 App Router project with:
- •React 19 with TypeScript
- •Tailwind CSS 4 for styling
- •Components organized in
src/components/by feature
Component Structure
Components in this project follow these patterns:
- •
src/components/ui/- Reusable UI components (Button, Input, Panel) - •
src/components/home/- Home page components - •
src/components/fight/- Fight display components - •
src/components/admin/- Admin components
Steps
- •Determine placement: Based on the component purpose, place it in the appropriate subdirectory
- •Check existing patterns: Look at similar components in
src/components/for styling and structure patterns - •Create component: Use TypeScript with inline props interface
- •Apply Tailwind: Use Tailwind CSS classes consistent with existing components
- •Add client directive: Add
'use client'if the component uses hooks, event handlers, or browser APIs
Template
tsx
'use client'
interface ComponentNameProps {
// props here
}
export function ComponentName({ ...props }: ComponentNameProps) {
return (
<div className="...">
{/* component content */}
</div>
)
}
Guidelines
- •Use functional components with explicit return types when needed
- •Define props interface in the same file
- •Use Tailwind CSS classes (check globals.css for custom utilities)
- •Export named functions, not default exports
- •Add
'use client'only when needed (hooks, events, browser APIs) - •Keep components focused and composable