Form

The submit boundary for Fields: form-wide validation timing, server error mapping and reset handling.

UI SkillbookSiteplane docsSiteplane UI 1.8.1
Works withClaude CodeCodexCursorOpenCodeUniversal
Install

Run npx uiskillbook get siteplane-form and follow the Siteplane Form skill it prints for this task.

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: installation.

When to pick it

  • vs Field: Use Field for each control inside the Form. Field-level settings override the Form's.
  • vs Fieldset: Pick Fieldset to group related Fields within the Form under a legend.

Rules

  • Pass server messages through errors, keyed by each Field's name.
  • Use onFormSubmit to receive values without a page navigation, or call preventDefault yourself in onSubmit.
  • Give the submit Button type="submit" and show loading on it while your request runs.
  • Restore controlled values in onReset. A native reset leaves React state alone.
  • Re-validate on the server; async Field.validate does not block submission.

Reference

  • Form docs, with every prop, part and example (Markdown)
  • Siteplane UI 1.8.1, Forms & selection. Read the installed source under src/siteplane before relying on an API.

Add to your agent

Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides

CLI

npx uiskillbook get siteplane-form

MCP server

https://www.uiskillbook.com/mcp

Questions