# Shadcn Contact Form

> Complex input form with multiple fields

- Type: example, free and open source (MIT)
- Component: [Input](https://reui.io/components/input.md)
- Page: https://reui.io/components/input/c-input-15
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/input.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/input.md
- MCP: `get_example("c-input-15")`
- Registry item: https://reui.io/r/styles/base-nova/c-input-15.json
- Uses: Button, Field, Input, Select

## Best for

A short contact form with phone and country side by side, an address line and Cancel and Submit

## Agent notes

- The `form` has no submit handler, so Submit reloads the page; add onSubmit and call preventDefault
- No control carries a name, so FormData read from the `form` comes back empty until you add them

## Install

```bash
npx shadcn@latest add @reui/c-input-15
```

## About Shadcn Input

### When to use

- Labeled text, email and search fields, plain or restyled as a pill, an underline or borderless
- Native typed fields for passwords, phones, URLs, numbers, dates, times, files, colors and ranges
- Field states and hints: disabled, required or optional marks, errors, character counts and password strength

### When not to use

- Icons, buttons, units or a prefix that sit inside the border of the box: use [Input Group](https://reui.io/components/input-group.md) (`get_component("input-group")`)
- International numbers chosen by country flag and formatted as the user types: use [Phone Input](https://reui.io/components/phone-input.md) (`get_component("phone-input")`)
- A whole create or edit page that gathers many fields under one save action: use the [Form blocks](https://reui.io/blocks/application/form.md)

### Agent notes

- The red invalid border comes from `aria-invalid` on `Input` in every style; `FieldError` only prints the message

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
