# Input types

> Password, number, search, date and time share one height and frame. In dark mode, the browser’s pickers and spinners switch to dark too.

Example: https://hextaui.com/docs/input/examples/types
Component docs: https://hextaui.com/docs/input.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/input-types.json
```

This adds `components/examples/input/types.tsx` with the Input component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/input/types.tsx"
import { Input } from "@/components/ui/input"

export function InputTypes() {
  return (
    <div className="grid w-full max-w-sm gap-3">
      <Input type="password" aria-label="Password" defaultValue="hunter2" />
      <Input type="number" aria-label="Seats" defaultValue={12} min={1} />
      <Input type="search" aria-label="Search" placeholder="Search…" />
      <Input type="date" aria-label="Start date" defaultValue="2026-10-03" />
      <Input type="time" aria-label="Start time" defaultValue="09:30" />
    </div>
  )
}
```

## Props in this example

### Input

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `string \| number \| string[]` | – |  |
| `type` | `string` | `"text"` |  |

## More Input examples

- [Sizes](https://hextaui.com/docs/input/examples/sizes.md)
- [With a description](https://hextaui.com/docs/input/examples/description.md)
- [Invalid](https://hextaui.com/docs/input/examples/invalid.md)
- [Native validation](https://hextaui.com/docs/input/examples/native-validation.md)
- [Disabled](https://hextaui.com/docs/input/examples/disabled.md)
- [Read only](https://hextaui.com/docs/input/examples/read-only.md)
- [File](https://hextaui.com/docs/input/examples/file.md)
- [Controlled](https://hextaui.com/docs/input/examples/controlled.md)
- [With a button](https://hextaui.com/docs/input/examples/with-button.md)
- [Grid](https://hextaui.com/docs/input/examples/grid.md)
- [Long content](https://hextaui.com/docs/input/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/input/examples/rtl.md)
