Field
- from @ai2
Form field composition: Field, FieldControl, FieldLabel, FieldDescription, FieldError. Auto-wires accessibility: FieldControl (a Slot around any control) receives a generated id, aria-describedby pointing at the description and error, and aria-invalid; the label targets the control automatically. invalid/disabled props drive data attributes, label color and dimming. orientation switches vertical (default) and horizontal (label-left, e.g. switch rows).
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @ai2/fieldLive preview
No live preview has been built for this component yet.
Registry dependencies3
- @ai2/label
- @ai2/tokens
- @ai2/primitives
Packages0
No npm packages are installed with it.
