Form
The submit boundary for Fields: form-wide validation timing, server error mapping and reset handling.
Paste this into your agent.
Wrap Form around Fields that submit together, from a sign-in to a settings page. It decides when validation runs, shows server errors next to the right field, and moves focus to the first problem.
Install
bashnpx shadcn@4.18.0 add @siteplane/form
Import it from @/siteplane/components/form. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Use Field for each control inside the Form. Field-level settings override the Form's.
- vs : Pick Fieldset to group related Fields within the Form under a legend.
Rules
- Pass server messages through
errors, keyed by each Field'sname. - Use
onFormSubmitto receive values without a page navigation, or callpreventDefaultyourself inonSubmit. - Give the submit Button
type="submit"and showloadingon it while your request runs. - Restore controlled values in
onReset. A native reset leaves React state alone. - Re-validate on the server; async
Field.validatedoes not block submission.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Form Field Validation Timingby UI Skillbook
Validate at the right moment — not on every keystroke, not only on submit.
Forms
Siteplane Attachmentby UI Skillbook
A card for a file or image attached to a message or draft, with upload states and actions.
Siteplane UI
Siteplane Autocompleteby UI Skillbook
A text input that suggests completions while still accepting whatever the person types.
Siteplane UI
Siteplane Calendarby UI Skillbook
An inline month grid for picking a single date, several dates or a range, with unavailable-day rules.
Siteplane UI