import { ComponentExample } from "@/components/ComponentExample"
import { ComponentReference } from "@/components/ComponentReference"

export const metadata = {
  title: `Input`,
}

# {metadata.title}

A component that renders a form input field using Medusa's design system.

In this guide, you'll learn how to use the Input component.

<ComponentExample name="input-demo" />

## Usage

```tsx
import { Input } from "@medusajs/ui"
```

```tsx
<Input placeholder="Placeholder" id="input-id" />
```

---

## API Reference

<ComponentReference mainComponent="Input" />

---

## Examples

### Password

<ComponentExample name="input-password" />

### Search

<ComponentExample name="input-search" />

### Disabled

<ComponentExample name="input-disabled" />

### Small Size

<ComponentExample name="input-small" />

### Controlled

<ComponentExample name="input-controlled" />

### Error State

You can leverage the native `aria-invalid` property to show an error state on your input:

<ComponentExample name="input-error" hideFeedback />
