# Input

> Text input with variants, sizes, label, hint, and error states.

- Tier: free, MIT
- Category: Forms
- Docs: https://ui.mlola.com/docs/components/input

## Install

```bash
npx mlola-ui add input
```

```tsx
import { Field } from "@/components/ui/input";
```

## Props with fixed values

| Component | Prop | Values | Default | Description |
| --- | --- | --- | --- | --- |
| Input | `size` | `sm`, `md`, `lg` | `md` |  |
| Input | `variant` | `default`, `filled`, `subtle` | `default` |  |

## Example

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

export default function Example() {
  return <Input label="Email" type="email" placeholder="you@company.com" hint="We never share it." />;
}
```

## The same markup without React

```html
<div class="ml-input-field">
  <label class="ml-input-label" id="input-1-label" for="input-1">Email</label>
  <div class="ml-input-control">
    <input class="ml-input" id="input-1" aria-describedby="input-1-hint" data-variant="default" data-size="md" type="email" placeholder="you@company.com"/>
  </div>
  <p class="ml-input-hint" id="input-1-hint">We never share it.</p>
</div>
```
