Ship-It Designv0.0.3
GitHub

Field

Each example below is a real component instance — flip the theme toggle to see how it adapts.

With Label#

Loading…

With Hint#

Loading…

With Error#

Loading…

Required#

Loading…

Props#

Props for Field
PropTypeDefaultDescription
labelReactNodeVisible label rendered above the control.
hintReactNodeHelper text shown below the control when no error is present.
errorReactNodeError message shown below the control. Displaces `hint` when set.
requiredboolean | undefinedMarks the field with a visual asterisk (does not enforce validity).
children *(props: { id: string; 'aria-describedby': string | undefined; 'aria-invalid': boolean | undefined; }) => ReactNodeThe control. Receives `id`, `aria-describedby`, and `aria-invalid` automatically. Pass via render prop so the field can wire IDs without consumers thinking about it.