Form
Native form behavior with a composed error summary.
Interactive preview
Usage
import { Form, FormField, Input, Button } from "@devvy-ui/react";
<Form onSubmit={event => event.preventDefault()}><FormField label="Email" required>{field => <Input {...field} name="email" type="email" />}</FormField><Button type="submit">Continue</Button></Form>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| errorSummary | ReactNode | — | Optional alert content after validation. |
| action / method / onSubmit / onReset | native form props | native defaults | Application-owned submission and reset. |
Accessibility & behavior
Platform Behavior & Guidelines
Native required/type validation is preserved unless you explicitly opt out. Connect a real submit handler or action in your app. The component does not send data to a service or invent validation rules. Use errors only when present and avoid duplicate live announcements.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add formMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.