---
title: Field
description: Fields wrap a single form control with label, description, and error messaging in a consistent layout.
category: Forms
---
import { meta as FieldMeta, Default } from '@/content/stories/field';
import Canvas from '@/components/component-docs/canvas';
import Demo from '@/components/component-docs/demo';
export const config = {
dependencies: {
components: [Canvas, Demo],
scripts: [
'../../components/component-docs/demo.script.tsx',
'../../components/component-docs/canvas.script.tsx',
'../../components/component-docs/controls.script.tsx',
],
},
};
# Field
Fields wrap a single form control with label, description, and error messaging in a consistent layout.
## Try it
## Usage
Set `name` on `RuiField` to register with `RuiForm` and to copy onto the listed control. Place a Radiant control (`RuiInput`, `RuiSelect`, `RuiSwitch`, …) as the child; Field discovers controls via `data-rui-control` and known host tags, not bare `` elements. Use `RuiFieldDescription` and `RuiFieldError` for helper and error text.
```tsx
import { RuiField, RuiFieldDescription, RuiFieldError } from '@ecopages/radiant-ui/field';
import { RuiLabel } from '@ecopages/radiant-ui/label';
import { RuiInput } from '@ecopages/radiant-ui/input';
EmailWe will never share your email.
```
## Custom markup
`` coordinates any light-DOM tree that matches its query contract. The `RuiField` helper stamps `[data-ref="field"]`; it is not required.
```tsx
import '@ecopages/radiant-ui/field';
import '@ecopages/radiant-ui/input';
We will never share your email.
```
The field wires `aria-describedby`, `aria-invalid`, and error text on the control. Use a library control host or `[data-rui-control]` — bare native inputs without the marker are ignored.
Set `name` on the field (or on a form-associated host) so a native `