Get Started
Components
- Accordion
 - Alert Dialog
 - Alert
 - Aspect Ratio
 - Avatar
 - Badge
 - Breadcrumb
 - Button Group
 - Button
 - Calendar
 - Card
 - Carousel
 - Chart
 - Checkbox
 - Collapsible
 - Combobox
 - Command
 - Context Menu
 - Data Table
 - Date Picker
 - Dialog
 - Drawer
 - Dropdown Menu
 - Empty
 - Field
 - Form
 - Hover Card
 - Input Group
 - Input OTP
 - Input
 - Item
 - Kbd
 - Label
 - Menubar
 - Native Select
 - Navigation Menu
 - Pagination
 - Popover
 - Progress
 - Radio Group
 - Resizable
 - Scroll Area
 - Select
 - Separator
 - Sheet
 - Sidebar
 - Skeleton
 - Slider
 - Sonner
 - Spinner
 - Switch
 - Table
 - Tabs
 - Textarea
 - Toast
 - Toggle Group
 - Toggle
 - Tooltip
 - Typography
 
import { Input } from "@/components/ui/input"
export function InputDemo() {
  return <Input type="email" placeholder="Email" />
}
Installation
pnpm dlx shadcn@latest add input
Usage
import { Input } from "@/components/ui/input"<Input />Examples
Default
import { Input } from "@/components/ui/input"
export function InputDemo() {
  return <Input type="email" placeholder="Email" />
}
File
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function InputFile() {
  return (
    <div className="grid w-full max-w-sm items-center gap-3">
      <Label htmlFor="picture">Picture</Label>
      <Input id="picture" type="file" />
    </div>
  )
}
Disabled
import { Input } from "@/components/ui/input"
export function InputDisabled() {
  return <Input disabled type="email" placeholder="Email" />
}
With Label
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
export function InputWithLabel() {
  return (
    <div className="grid w-full max-w-sm items-center gap-3">
      <Label htmlFor="email">Email</Label>
      <Input type="email" id="email" placeholder="Email" />
    </div>
  )
}
With Button
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
export function InputWithButton() {
  return (
    <div className="flex w-full max-w-sm items-center gap-2">
      <Input type="email" placeholder="Email" />
      <Button type="submit" variant="outline">
        Subscribe
      </Button>
    </div>
  )
}
Changelog
2025-09-18 Remove flex class
Edit input.tsx and remove the flex class from the input component. This is no longer needed.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel