Reference index

Components

Field

Label, control, description and error layout on Base UI Field and Fieldset; errors shown by a 2px ink rule and an ! icon.

Preview

Shown on the front page. Keep it under 70 characters.

Install

bash

npx shadcn add @eloquent/field

Usage

tsx

import { Field, FieldDescription, FieldError, FieldLabel } from "@/components/ui/field";

<Field invalid={!!error}>
  <FieldLabel>Headline</FieldLabel>
  <Input />
  <FieldDescription>Shown on the front page.</FieldDescription>
  <FieldError errors={[error]} />
</Field>

States

Byline

As printed under the headline.

Choose a desk.
Optional

Set by the night editor.

StateTreatment
Invalid2px ink left rule, ink ! icon and a Barlow 600 message
DisabledLabel and description in halftone, cursor-not-allowed
Focus2px ink outline on the control

Keyboard

KeyAction
Tab / Shift+TabMove between the field controls
Enter (in a form)Submits; Base UI validates and moves the error onto the field

Vietnamese

Hiển thị trên trang nhất. Không quá 70 ký tự.

Ink adaptation

Errors are never red: a 2px ink rule, an ink icon and a message. Descriptions are Source Serif 14px in muted-foreground; legends open with the 3px heavy rule in Playfair 900; separators are 1px hairlines. Built on Base UI Field and Fieldset.