Skip to main content

Field

Field — Prism component.

Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggle
Live demo
Open ↗

When to use

Field — Prism component.

Accessibility

Always render a visible <label> (the label prop wires htmlFor/id for you). Errors set aria-invalid and are announced via aria-describedby. Required fields expose aria-required.

Import

const { Field } = window.PrismDesignSystem_39d121;

Props

PropTypeRequiredDescription
labelReact.ReactNode
descriptionReact.ReactNode
errorMessageReact.ReactNode
isRequiredboolean
isInvalidboolean
hintReact.ReactNodeRight-aligned secondary note in the label row (e.g. "Optional").
idstring
htmlForstring
classNamestring
childrenReact.ReactNode | ((aria: FieldAria) =&gt; React.ReactNode)