Form
A modular, composable form system with accessible inputs, textareas, custom selects, checkboxes, radio groups, switches, and animated validation messages.
Loading preview…
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/form
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| onSubmit | (e: FormEvent) => void | undefined | Form submission handler |
| error | string | boolean | undefined | Validation error text or boolean trigger |
| showPasswordToggle | boolean | false | Enables eye icon toggle for password inputs |
| required | boolean | false | Displays red asterisk and enforces requirement |
| leftIcon | React.ReactNode | undefined | Leading icon inside input fields |
| rightIcon | React.ReactNode | undefined | Trailing icon inside input fields |