Nusa UINusa UI

Displays a form input field.

registry/examples/input-demo.tsx
import { Input } from "@/registry/ui/input"

export default function InputDemo() {

Installation

pnpmnpmyarnbun
pnpm dlx shadcn@latest add https://nusa-ui.vercel.app/r/input.json

Usage

import { Input } from "@/components/ui/input"
<Input type="text" placeholder="Enter your name" />

Examples

Default

registry/examples/input-default.tsx
import { Input } from "@/registry/ui/input"

export default function InputDefault() {

With Label

registry/examples/input-with-label.tsx
import { Input } from "@/registry/ui/input"
import { Label } from "@/registry/ui/label"

Disabled

registry/examples/input-disabled.tsx
import { Input } from "@/registry/ui/input"

export default function InputDisabled() {

With Button

registry/examples/input-with-button.tsx
import { Button } from "@/registry/ui/button"
import { Input } from "@/registry/ui/input"

File Input

registry/examples/input-file.tsx
import { Input } from "@/registry/ui/input"
import { Label } from "@/registry/ui/label"

API Reference

Input

All standard HTML input attributes are supported.

PropTypeDefaultDescription
typestring"text"The input type
placeholderstring-Placeholder text
disabledbooleanfalseDisable the input