---
title: Field
description: A form field component with label, description, and validation.
links:
doc: https://base-ui.com/react/components/field#api-reference
---
## Preview
## Installation
CLIManual
```bash
npx @olyx/cli@latest add field
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx
import { Field, FieldLabel, FieldDescription, FieldError } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
```
```tsx
EmailWe'll never share your email.
```
## API Reference
#### Field
Root component. Styled wrapper for `Field.Root` from Base UI.
| Prop | Type | Default |
| ------------- | ---------------------------- | ------------ |
| `orientation` | `"horizontal" \| "vertical"` | `"vertical"` |
All props from [Base UI Field](https://base-ui.com/react/components/field#api-reference) are also supported, including `invalid` and `disabled`.
#### FieldLabel
Label for the field. Alias for `Field.Label` from Base UI.
#### FieldDescription
Description text below the field. Alias for `Field.Description` from Base UI.
#### FieldError
Error message displayed when the field is invalid. Alias for `Field.Error` from Base UI.
#### FieldGroup
Container for grouping multiple fields with vertical flex layout.
#### Fieldset
Root fieldset component. Alias for `Fieldset.Root` from Base UI.
#### FieldsetLegend
Legend for a fieldset. Alias for `Fieldset.Legend` from Base UI.
#### FieldsetDescription
Description text for a fieldset.
## Examples
### With Description
### With Error
### Validity
### Horizontal
### Fieldset
### Disabled
### Autocomplete
### Combobox
### Combobox Multiple
### Textarea
### Select
### Checkbox
### Checkbox Group
### Radio Group
### Switch
### Slider
### Number Field
### Complete Form