Form

Compare Form for React and React Native in VLLNT UI 0.4.0. Explore source, dependencies and native capabilities. Native is source-only; npm publication is pending.

Supported platforms:WebNative
Report a bug

What it is and when to use

Form is a composable validation wrapper for React built on React Hook Form. It groups a label, control, description, and error message into accessible field units, automatically wiring aria-describedby, aria-invalid, and aria-required and marking error messages with role="alert". Pass a Zod schema for managed validation, or hand it your own useForm instance. Use it whenever you need labelled, validated inputs with consistent error handling across sign-up, settings, or checkout forms.

Form

Preview

Switch between light and dark to inspect the embedded Storybook preview.

Validation wrapper for composing labels, descriptions, controls, and messages. Part of the form family in VLLNT UI, it ships as a machine-readable registry entry — copy the source directly into your app with the shadcn CLI and own it, no runtime dependency on a component library.

Platform comparison

PlatformDependenciesCapabilities
Web@vllnt/ui@^0.3.0Browser rendering, DOM events, and ARIA semantics
Native@vllnt/ui-native, react-nativeNative-adapted interaction and accessibility

Installation

Add Form to your project with the shadcn CLI. The source lands in your codebase, ready to adapt:

pnpm dlx shadcn@latest add https://ui.vllnt.com/r/form.json

Source

Stories

Explore every variant and state in the interactive Storybook:

FAQ

What is Form?
Form is an accessible, composable form wrapper for React. It pairs Label, control, description, and message parts with React Hook Form so each field validates and reports errors with the correct ARIA wiring.
How do I add Form?
Run `pnpm dlx shadcn@latest add https://ui.vllnt.com/r/form.json` to install it into your project via the shadcn CLI.
Does Form handle validation and accessibility?
Yes. It integrates React Hook Form and Zod through zodResolver for schema validation, and automatically wires aria-describedby, aria-invalid, aria-required, and role="alert" on error messages.