Auto Form
InputSchema-driven auto-generated form from a Zod schema — labels, helpers, and validation.
Auto FormInput · Web
Loading Storybook preview…
Installation
bun add @otfdashkit/ui
Usage
Import AutoForm from @otfdashkit/ui.
Code
// Auto Form — Schema-driven auto-generated form from a Zod schema — labels, helpers, and validation.
//
// Install:
// bun add @otfdashkit/ui
import { AutoForm } from '@otfdashkit/ui'
export function Example() {
return (
<AutoForm>
{/* your content */}
</AutoForm>
)
}Props
Props declared in the AutoForm source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| onSubmitrequired | (data: Record<string, unknown>) => void | ||
| schemarequired | ZodObject<Readonly<{ [k: string]: $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; }>, $strip> | ||
| defaultValues | Record<string, unknown> | ||
| submitLabel | string | 'Submit' |