Docs
GitHub

Field

Full legal name on the account

Field is the wrapper every input uses. It renders a label, an optional description and error, and clones its child to connect them with the right id, aria-describedby, and aria-invalid. You get correct form accessibility without threading IDs by hand.

Usage

import { Field } from "@sina-design-system/core";

<Field label="Email" description="We'll never share it." error={errors.email}>
  <input type="email" name="email" />
</Field>

Examples

Label & description

Full legal name on the account

Error & required

Any control · the a11y wiring clones onto the child

Pick one

Free-form text

Whole units

Props

PropTypeDefaultDescription
labelReactNodeThe field label (associated with the control).
descriptionReactNodeHelper text below the label.
errorReactNodeAn error message. Sets aria-invalid and shows a bold warning glyph.

Errors carry a glyph

When error is set, Field renders the mandatory bold warning glyph beside the message, never color alone. That's a SINA-wide rule for error and warning states.