Input

A standard form input styled to match shadcn/ui.

The Input component displays a form input field.

Preview

Usage

Installation

$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/input.json

Basic Example

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

export default function App() {
  return <Input type="text" placeholder="Name" />;
}

Properties

The Input accepts all standard HTML input attributes.

PropTypeDefaultDescription
typestring"text"The HTML input type.
placeholderstringPlaceholder text displayed when the input is empty.
classNamestringAdditional CSS classes for the input element.