1Sponsor

Form Field

Form field wrapper with label, hint, and error

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/form-field.json

Usage

import { FormField } from "@/components/ui/form-field";
<FormField label="Username" hint="Must be unique" required>
  <Text>my-input-here</Text>
</FormField>

API Reference

FormField

PropTypeDefault
labelstringrequired
childrenReactNoderequired
errorstringundefined
hintstringundefined
requiredbooleanundefined
gapnumber0
errorIconstring"✗"
labelColorstringundefined