media contract
Form
Composite of inputs + actions with validation, submission, and error summarisation.
Variants
- inline
- stacked
- horizontal
- multi-step
Sizes
- sm
- md
- lg
Slots
- fields
- errors
- actions
Example
<Form onSubmit={handle}><Field><Label>Email</Label><Input /></Field><FormActions><Button variant="ghost">Cancel</Button><Button type="submit">Save</Button></FormActions></Form>Usage rule
Validate on blur for individual fields, on submit for the whole form.
The full Form contract has 6 more rules, plus the do-not patterns. Get the full recipe.