Shadcn.io is not affiliated with official shadcn/ui
Shadcn Input
React input for emails, search, and file uploads. Built with TypeScript and Tailwind CSS for Next.js using Base UI — labels, invalid state, and field groups.
The shadcn input is a styled native <input>. Focus it and type — the ring and file button come with the class. Use it for emails, names, search, and file picks. If the answer is a paragraph, that is a Textarea.
Looking for a neobrutalism version for shadcn?
Same input, thicker borders. The NeoBrutalism input is the kit if you want that look.
Usage
import { Input } from "@/components/ui/input"<Input type="email" placeholder="Email" />type picks the keyboard. disabled greys it out. aria-invalid is the red border.
Composition
Pair it with Field for the label, hint, and error.
Basic
A bare input. The placeholder is the only hint.
Field
Field, FieldLabel, and FieldDescription — the label, the box, and the hint.
Field Group
FieldGroup stacks fields. Reset and submit sit on a horizontal Field.
Disabled
disabled on the input. data-disabled on Field so the label greys out with it.
Invalid
aria-invalid on the input. data-invalid on Field so the label goes red too.
File
type="file" — the native picker, same border as the rest.
Inline
orientation="horizontal" plus a Button. Search and go.
Grid
Two columns. First name and last name share a row.
Required
required on the input. Mark the label with a * so people see it before submit.
Badge
A Badge in the label — recommended, beta, optional.
Input Group
Icons and prefixes go in Input Group, not absolute-positioned on the input.
Button Group
Button Group joins the field and the action with no gap.
Form
Inside a Field on a real form. The label and the error stay with the input.
RTL
Wrap with DirectionProvider and dir="rtl". Labels stay Arabic.
API
Prop
Type
Every native <input> prop works — value, defaultValue, onChange, name, id.
Notes
Invalid needs two attributes
aria-invalid on the input, data-invalid on the Field. One without the other leaves the control or the label unstyled.
Prefixes and icons belong in Input Group, not absolute on the input.
With other components
Label, hint, and error
LabelName the box
FormValidate on submit
Input GroupPrefix inside the field
Button GroupAction beside the field
BadgeFlag in the label
Questions
Related
Was this page helpful?
Sign in to leave feedback.
Hover Card
React hover card for profile and link previews. Built with TypeScript and Tailwind CSS for Next.js using Base UI — open delay, side, and collision flip.
Input Group
React input group for icons, buttons, and addons on inputs. Built with TypeScript and Tailwind CSS for Next.js using Base UI — one focus ring for the whole control.