---
title: "Field"
description: "Form field layout with a label, description, and error message, wired up for accessibility, around any edbn/ui input."
plan: Free
docs: https://ui.edbn.me/docs/components/field
---

# Field

Form field layout with a label, description, and error message, wired up for accessibility, around any edbn/ui input.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/field.json
```

## Dependencies
- npm: class-variance-authority@^0.7.1
- edbn: edbn-base, label, separator

## Usage

```tsx examples/field-basic.tsx
"use client";
import { Field, FieldDescription, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";

export default function FieldBasicPreview() {
  return (
    <Field className="max-w-compact">
      <FieldLabel htmlFor="email-demo">Email</FieldLabel>
      <Input id="email-demo" type="email" placeholder="you@example.com" />
      <FieldDescription>
        We will only use this for account notices.
      </FieldDescription>
    </Field>
  );
}
```

## Files
- components/ui/field.tsx (246 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
