setFeedback(e.target.value)}
/>
```
### FormFileInput
```tsx
import { FormFileInput } from "@/components/ui/form-fields";
```
---
## Props Reference
### Common Props (All Components)
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `fieldName` | `string` | ✅ | Unique identifier (becomes id/name) |
| `label` | `string` | ✅ | Label text |
| `error` | `string` | ❌ | Error message to display |
| `description` | `string` | ❌ | Help text below field |
| `required` | `boolean` | ❌ | Adds required indicator |
| `disabled` | `boolean` | ❌ | Disables the field |
| `className` | `string` | ❌ | Additional CSS classes |
### FormInput Additional Props
| Prop | Type | Description |
|------|------|-------------|
| `type` | `string` | Input type (text, email, password, number, etc.) |
| `placeholder` | `string` | Placeholder text |
| `min`, `max` | `number` | For number inputs |
| `pattern` | `string` | Validation pattern |
### FormSelect Additional Props
| Prop | Type | Description |
|------|------|-------------|
| `children` | `ReactNode` | Option elements |
| `placeholder` | `string` | First disabled option text |
---
## Accessibility Features
The form components automatically provide:
### 1. Label Association
```html
```
### 2. Error Announcements
```html
Invalid email address
```
### 3. Description Association
```html
We'll never share your email
```
---
## Form Patterns
### Basic Form
```tsx
import { FormInput, FormSelect, FormCheckbox } from "@/components/ui/form-fields";
function MyForm() {
const [formData, setFormData] = useState({
email: '',
role: '',
newsletter: false,
});
const [errors, setErrors] = useState({});
return (
);
}
```
### With Loading State
```tsx
```
---
## Anti-Patterns
### ❌ Don't Use Raw HTML Elements
```tsx
// ❌ WRONG
// ✅ CORRECT
```
### ❌ Don't Forget fieldName
```tsx
// ❌ WRONG - no fieldName
// ✅ CORRECT
```
### ❌ Don't Duplicate IDs
```tsx
// ❌ WRONG - duplicate fieldNames
// ✅ CORRECT - unique fieldNames
```
---
## Reference Files
| File | Purpose |
|------|---------|
| `src/components/ui/form-fields.tsx` | Component implementations |
| `docs/FORM_SYSTEM.md` | Full documentation |
---
## Related Skills
- `design-system` - Form styling and theming
- `architecture-philosophy` - Use existing components