# Input: Grid

> Inputs fill their container, so place them in a grid. Give grid cells `min-w-0` so long values can’t stretch a column.

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

## Add this example

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

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

## Source

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

export function InputGrid() {
  return (
    <div className="grid w-full max-w-sm grid-cols-2 gap-3">
      <div className="flex min-w-0 flex-col gap-2">
        <Label htmlFor="input-first-name">First name</Label>
        <Input id="input-first-name" autoComplete="given-name" />
      </div>
      <div className="flex min-w-0 flex-col gap-2">
        <Label htmlFor="input-last-name">Last name</Label>
        <Input id="input-last-name" autoComplete="family-name" />
      </div>
    </div>
  )
}
```

## 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)
- [Input types](https://hextaui.com/docs/input/examples/types.md)
- [Controlled](https://hextaui.com/docs/input/examples/controlled.md)
- [With a button](https://hextaui.com/docs/input/examples/with-button.md)
- [Long content](https://hextaui.com/docs/input/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/input/examples/rtl.md)
