sheengemologic ui
All components

Field

A visible label, description, and validation message associated with one native labelable control.@gemologic/sheen · forms

Playground

Visible to the team.
<Field label="Notes" description="Visible to the team." disabled={false} required={false}>{control => <textarea {...control} />}</Field>

Variant matrix

Custom native control
Visible to the team.

Anatomy

Package
@gemologic/sheen
Source
packages/ui/src/primitives/Field.tsx
Tokens
  • --sheen-color-fg-muted
  • --sheen-color-danger-fg
  • --sheen-space-block-xs

Accessibility

Role: native label association; no additional landmark or live regionKeyboard: Native control behavior, Label activation focuses its control

Do

  • Use within wrapper implementations or for a custom labelable control. Input already composes Field.
  • Keep controls mounted when descriptions or errors change. Apps own validation and announcements.

Do not

  • Do not wrap a labeled Input in another Field.
  • Do not use a single Field label for a group of controls; use group semantics.

Generated props

NameTypeDefaultDescription
label *stringRequired visible label.
controlIdstring | undefinedOverride the stable generated control ID; must be unique in the document.
descriptionstring | undefinedSupporting instructions referenced by aria-describedby.
errorstring | undefinedValidation message, also referenced by aria-describedby. A nonempty error sets aria-invalid.
requiredboolean | undefinedfalseSet native required and display a decorative required marker.
disabledboolean | undefinedfalseForward native disabled to the control.
children *(control: FieldControlProps) => JSX.ElementRender one labelable control and spread the supplied reactive bindings on it. Do not destructure or snapshot them.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.