For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/en/components/form.md.

Form

Organizes related fields, validation summary, and submission into one recoverable task while preserving native browser semantics.

Live preview

Usage

<form class="form">
  <label class="field"><span class="label">Workspace name</span><input class="input" name="name" value="Research" required /></label><footer><button type="submit" class="btn">Save workspace</button></footer>
</form>

Contract

SurfaceValue
Root selectorform.form
Native root<form>
Statesready, submitting, success, invalid, error, read-only
Eventsreset, submit
Methods—

Product boundary

Form owns interaction structure, not requests, permission, or business validation. Do not group unrelated settings or replace specific errors with a permanently disabled submit button.

The component publishes a reusable interaction boundary only. Data fetching, persistence, permission, trusted content, and business entities remain host-owned.

Accessibility

Errors sit beside their field and can be reached from the summary. Submission preserves input, failure preserves focus context, and every field has a persistent label.