Skip to content

Field (molecule) ​

Label + control + error/helper text — the presentational glue for forms. Replaces the shadcn form.tsx FormItem/FormLabel/FormMessage scaffolding.

  • Layer: molecule · Status: BUILD · Import: import { Field } from "@/design-system"

Live demo ​

API ​

PropTypeNotes
labelReactNodeRendered as <Label htmlFor>.
htmlForstringBinds label → control.
requiredbooleanAppends *.
errorstringShown in destructive color; takes precedence over helperText.
helperTextReactNodeMuted helper below the control.
childrenReactNodeThe control (Input, Select, …).

Usage ​

tsx
<Field label="Email" htmlFor="email" error={errors.email?.message}>
  <Input id="email" />
</Field>

The RHF adapters (RHFTextField, …) wrap this — prefer them for react-hook-form.

Built on MUI Core (MIT). Part of the Tech Fleet Network monorepo.