Components
Form
Form primitives.
Use Form to manage validation, values, and submission.
We'll never share your email.
import { Form, FormField, FormItem, FormLabel, FormControl, Input, FormDescription, FormMessage, Button } from '@tile-ui/react';
export default function FormDemo() {
return (
<Form>
<FormFieldRegistry install
pnpm dlx shadcn@latest add @tile-ui/formPackage usage
import { Form, FormField, FormLabel, FormControl, Input, FormMessage } from '@tile-ui/react';
<Form>
<FormField name="email">
<FormLabel>Email</FormLabel>
<FormControl>
<Input />
</FormControl>
<FormMessage />
</FormField>
</Form>Highlights
useFormhook- Field, label, control, and message
- Resolver validation
Registry dependencies
| Item | Purpose |
|---|---|
form | Component source and module styles |
core | Framework-agnostic logic helpers |
styles | Shared SCSS tokens and globals |
API reference
Form
| Prop | Type | Default |
|---|---|---|
defaultValues | Record<string, unknown> | — |
resolver | (values: FormValues) => FormErrors | Promise<FormErrors> | — |
form | unknown | — |