Skip to main content

Starwind UI v3.0 beta is now available! Read the migration guide

Runtime example adjustment

Form remains a native HTML form. The Runtime adds validation timing, field coordination, and an accessible error summary without requiring React or a form-state library.

Installation

Framework Availability

Astro Available React Available

Form is available for Astro and React.

Usage

The browser still owns submission and FormData. Use ordinary action, method, submit, and reset behavior; Runtime controls serialize through their installed hidden inputs.

API Reference

Styled Component API

These props are added or materially changed by the installed Astro styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Follow the Primitive and Runtime links for lower-level behavior props.

Form

Inherits form attributes.

Contains the following additional props:

Prop Type Default Toggle details
errorVisibility import("@starwind-ui/runtime/form").FormValidationTiming
Description
Selects when validation errors become visible.
Classification
Primitive override
Primitive prop
form.Root.errorVisibility
revalidationTiming import("@starwind-ui/runtime/form").FormValidationTiming
Description
Selects when a previously validated field is validated again.
Classification
Primitive override
Primitive prop
form.Root.revalidationTiming
validationTiming import("@starwind-ui/runtime/form").FormValidationTiming
Description
Selects when validation first runs.
Classification
Primitive override
Primitive prop
form.Root.validationTiming

Primitive And Runtime API

Use these references when you need the lower-level behavior APIs behind Form.

Primitive API

Runtime API

Form primitive
createForm from @starwind-ui/runtime/form

Changelog

v1.0.0

  • Added Runtime-backed native form coordination and validation timing.
  • See the Form Primitive for the underlying unstyled anatomy and behavior API.