shadcn.io is an independent project built on shadcn/ui
Username sits above the field. The placeholder is johndoe. Under the field: Choose a unique username for your account.
This order suits a hint people read while the value is filled. The field itself is an Input and does not know if the name is free. Base UI in React does not reserve it.
Installation
Anatomy

Usage
<Field className="max-w-md">
<FieldLabel htmlFor="account-username">Username</FieldLabel>
<Input id="account-username" placeholder="johndoe" type="text" />
<FieldDescription>
Choose a unique username for your account.
</FieldDescription>
</Field>FAQ
Where does the helper text sit?
The order inside Field is FieldLabel, then Input, then FieldDescription. The description reads Choose a unique username for your account.
How does Username name the input?
FieldLabel names the input. Its htmlFor matches the control's id. The label text is Username.
What is the placeholder for?
The placeholder is johndoe, and it clears once someone types. The description stays under the field.
API Reference
Field
Sets htmlFor="account-username". The rest is on the Field page.
Input
Sets id="account-username", placeholder="johndoe" and type="text". The rest is on the Input page.





