---
title: Form
description: A form wrapper component that simplifies validation and submission.
links:
doc: https://base-ui.com/react/components/form#api-reference
---
## Installation
CLI
Manual
```bash
npx shadcn@latest add @coss/form
```
Install the following dependencies:
```bash
npm install @base-ui/react zod
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx
import {
Field,
FieldError,
FieldLabel,
} from "@/components/ui/field"
import { Form } from "@/components/ui/form"
import { Input } from "@/components/ui/input"
```
```tsx
```
## API Reference
### Form
Thin wrapper around Base UI `Form` with no default layout. Pass **`className`** for spacing and structure (for example `flex w-full flex-col gap-4` for a vertical field stack).
**Dialog, sheet, drawer:** Place **`DialogHeader`** (or sheet/drawer header) **outside** the form. Wrap **`DialogPanel`** and **`DialogFooter`** only in **`