For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
0
Sponsor

Input

Displays a form input field or a component that looks like an input field.

import { Input } from "@/components/input/input";

export function InputDemo() {
  return <Input placeholder="Email" style={{ maxWidth: 280 }} type="email" />;
}

Installation

$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/input.json

Usage

import { Input } from "@/components/ui/input/input";
<Input type="email" placeholder="Email" />

Examples

Label

Pair the input with a label element.

import { Input } from "@/components/input/input";

export function InputLabel() {
  return (
    <div
      style={{

Disabled

import { Input } from "@/components/input/input";

export function InputDisabled() {
  return (
    <Input
      disabled

File

import { Input } from "@/components/input/input";

export function InputFile() {
  return (
    <div
      style={{

RTL

To enable right-to-left support, see the RTL guide.

"use client";

import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";
import { Input } from "@/components/input/input";

API Reference

Input

The Input component is a styled wrapper around the native <input> element and accepts all of its props.

PropTypeDefault
typestring-
classNamestring-