Skip to content

Commit d3fb752

Browse files
Update .github/instructions/components.instructions.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7756313 commit d3fb752

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/instructions/components.instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
324324

325325
**REQUIRED**: Use shadcn/ui Form components for all forms. This provides consistent styling, accessibility, and validation.
326326

327+
> **Note:** For simple forms such as single-field search bars or newsletter subscription inputs that do not require complex validation, it is acceptable to use shadcn/ui Input components directly without the full Form structure.
328+
> Examples include:
329+
> - Search input in a navbar or sidebar
330+
> - Newsletter signup with only an email field and basic validation
331+
> - Quick filter fields with no multi-field dependencies
332+
>
333+
> In these cases, ensure accessibility (label, ARIA attributes) and consistent styling are maintained. For multi-field forms or forms requiring advanced validation, always use the full shadcn/ui Form pattern.
327334
**Pattern**: `<Form><FormField><FormItem><FormLabel><FormControl><Input /></FormControl><FormMessage /></FormItem></FormField></Form>`
328335
329336
**Reference**: https://ui.shadcn.com/docs/components/form

0 commit comments

Comments
 (0)