# Input

> Text field in 3 variants: plain, search (magnifier icon), and command (a ⌘K hint). Supports error state and 3 sizes.

Section: Forms. Docs: https://entrepta.vercel.app/docs/components/input

## Install

```bash
npx @entrepta/cli@latest add input
```

Files: `primitives/input.tsx`, `primitives/kbd.tsx`.
npm packages: `class-variance-authority`, `@phosphor-icons/react`.
Comes with: `kbd`.

## Usage

```tsx
import { Input } from "@/components/entrepta/input"

<Input placeholder="project-name" />
<Input variant="search" placeholder="search components…" />
<Input variant="command" placeholder="run command…" />
<Input state="error" defaultValue="HEALTHKIT_KEY" />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"default" \| "search" \| "command"` | "default" | Shows prefix/suffix icon |
| `size` | `"sm" \| "md" \| "lg"` | "md" | Height |
| `state` | `"default" \| "error"` | "default" | Border color for validation feedback |
