Components/Field

Search documentation

Jump to any guide or component.

↑↓ move · Enter open · Esc close

Forms · Field

SSR NativeAccessible

Field

Coordinates a form label, description, required state, and validation message.

Live previewv0.1.4

Used for operational notifications.

Astro
---
import { Field } from '@charvesta/cetha';
---

<Field id="email" label="Email" required>
  <Input id="email" name="email" type="email" required />
</Field>

API reference

PropTypeDefaultDescription
id*stringShared identifier for the field relationship.
label*stringVisible field label.
descriptionstringOptional help text.
errorstringValidation message.
requiredbooleanfalseShows the required indicator.
classstringAdditional classes forwarded to the rendered element.

Accessibility

Pass matching IDs and aria-describedby values to keep every relationship explicit.