Create a new React component: $ARGUMENTS
Steps
- •Parse
$ARGUMENTSfor the component name and optional directory (partyorui). Default touiif not specified. - •Read existing components in the target directory (
components/party/orcomponents/ui/) for naming and style patterns. - •Create
components/<dir>/<ComponentName>.tsxwith this structure:
tsx
'use client'
// imports as needed
interface <ComponentName>Props {
// props
}
export function <ComponentName>({ }: <ComponentName>Props) {
return (
<div>
{/* component content */}
</div>
)
}
- •Add the export to the barrel file
components/<dir>/index.ts:tsexport { <ComponentName> } from './<ComponentName>' - •Fill in the component implementation based on the description in
$ARGUMENTS.
Conventions
- •Always use
'use client'directive (this is a client-rendered app) - •Use named exports, not default exports
- •Use Tailwind CSS v4 utility classes for styling (no CSS modules)
- •Use
@/path alias for imports (e.g.,@/hooks/useParty) - •Props interface named
<ComponentName>Props - •Icons from
@/components/icons(checkcomponents/icons/index.tsfor available icons) - •Keep components under 300 lines (ESLint warning threshold)