Form
Category: Forms & inputs
<Form onSubmit={(e) => { e.preventDefault(); /* ... */ }} validationErrors={{ email: 'This email is already taken' }}> <TextInput name="email" label="Email" type="email" autoComplete="email" isRequired /> <Button type="submit">Sign up</Button></Form>Install: @helix-ui/core
import { Form } from '@helix-ui/core';status: stable · since: 0.1.0
Tags: form, validation, submit, rac
Anatomy
Section titled “Anatomy”<Form> Field… Field… [ Cancel ] [ Submit ]</Form>Layout
Section titled “Layout”- display —
block - width —
fill - height —
content - intrinsicSize —
native form element; layout by children - stackable —
true - fullBleed —
false
Visual
Section titled “Visual”A <form> wrapper with no inherent visuals. Provides a validationErrors prop that surfaces server validation against fields by name.
| Name | Type | Default | Description |
|---|---|---|---|
validationErrors |
Record<string, string | string[]> |
— | Server-side validation errors keyed by field name. Forwarded to each FieldError. |
onSubmit |
(e: FormEvent) => void |
— | Submit handler. Native form behavior unless e.preventDefault(). |
...rest |
FormHTMLAttributes<HTMLFormElement> |
— | All native form attributes. |
Tokens used
Section titled “Tokens used”space.5
Accessibility
Section titled “Accessibility”Notes
- Use
<Form>instead of<form>to get react-aria’s coordinated validation handling. - Server errors via
validationErrorsare surfaced to the corresponding fields automatically.
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
Field |
child |
Each control is wrapped in a Field. |
TextInput |
child |
RAC inputs accept label/description directly. |
Button |
child |
Submit button at the end. |
Textarea |
sibling |
|
Checkbox |
sibling |
|
RadioGroup |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
login form
Section titled “login form”“email + password + submit”
<Form onSubmit={handleSubmit}> <TextInput name="email" label="Email" type="email" autoComplete="email" /> <TextInput name="password" label="Password" type="password" autoComplete="current-password" /> <Button type="submit">Sign in</Button></Form>