shadcn.io is an independent project built on shadcn/ui
Account ID shows ACC-12345 and the field is disabled. A line under it says this field cannot be edited. The control looks dimmed.
Use it for an id people should see but not change, and say why. If they must copy it, or the form must send it, a read-only Input stays available. In React, Base UI leaves this disabled value out of the submit.
Installation
Anatomy

Usage
<Field className="w-full max-w-sm">
<FieldLabel htmlFor="disabled-account">Account ID</FieldLabel>
<Input
className="bg-background"
defaultValue="ACC-12345"
disabled
id="disabled-account"
type="text"
/>
<FieldDescription>This field cannot be edited.</FieldDescription>
</Field>FAQ
What does disabling the field do?
The input can't be focused or edited, it's skipped by Tab, and it's left out of the form's submitted data. It's dimmed with disabled:opacity-50 and shows a not-allowed cursor.
Where is disabled set?
On the Input, the native disabled attribute. The label stays at full strength.
How is the account ID shown?
As the input's default value, ACC-12345. The field is disabled, so it never changes and needs no change handler.
When should I use readOnly instead?
When people should still focus, select and copy the value, or when the form must submit it. A read-only field stays in the tab order and in the submitted data; a disabled one does neither.
API Reference
Field
Sets htmlFor="disabled-account". The rest is on the Field page.
Input
Sets defaultValue="ACC-12345", disabled, id="disabled-account" and type="text". The rest is on the Input page.





