Input

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

Preview

Installation

Use the CLI to add this component to your project.

npx shadcn@latest add https://ui.nyxhora.com/r/input.json

Usage

tsx
5 lines
1
2
3
4
5
import { Input } from "@/components/ui/input"

export default function MyComponent() {
  return <Input type="text" placeholder="Enter text..." />
}

Examples

Default

With Label

Disabled

With Icon

Password

File Input

Props

PropTypeDefaultDescription
typestring"text"The type of input
placeholderstringPlaceholder text
disabledbooleanfalseDisable the input
classNamestringAdditional CSS classes