Shadcn UI Components

Input

Input components for collecting user data. Includes text input, email, password, file upload, and textarea variations.


Input Examples

Basic Input

Input with Label

Input with Helper Text

Enter your email address.

Input with Button

Disabled Input

File Input

Textarea

Textarea with Helper Text

Your message will be copied to the support team.

Installation

# The components are already installed at:
# src/components/ui/shadcn/input.tsx
# src/components/ui/shadcn/textarea.tsx
# src/components/ui/shadcn/label.tsx

Usage

import { Input } from '@/components/ui/shadcn/input'
import { Label } from '@/components/ui/shadcn/label'
import { Textarea } from '@/components/ui/shadcn/textarea'

export function InputDemo() {
  return (
    <div className="grid gap-4">
      <div className="grid gap-2">
        <Label htmlFor="email">Email</Label>
        <Input type="email" id="email" placeholder="Email" />
      </div>
      <div className="grid gap-2">
        <Label htmlFor="message">Message</Label>
        <Textarea id="message" placeholder="Type your message..." />
      </div>
    </div>
  )
}

Props

Input

PropTypeDescription
typestringThe input type (text, email, password, file, etc.)
disabledbooleanDisables the input
placeholderstringPlaceholder text

Textarea

PropTypeDescription
rowsnumberNumber of visible text lines
disabledbooleanDisables the textarea
placeholderstringPlaceholder text
Previous
Hover Card