# Input (https://www.librechat.ai/docs/development/components/input)

`Input` is the text field used in LibreChat's forms. Pair it with `Label`, and give every field an id from React's `useId()` so the label still points at the right field when the component renders more than once.

## Default

<ComponentPreview example="input/default" title="Input with a label" />

## Invalid

Mark a field that failed validation with `aria-invalid`, and tie the message to it with `aria-describedby`. The field draws its border in the theme's destructive color.

<ComponentPreview example="input/invalid" title="Input in an invalid state" />

## Props

`Input` accepts every native `input` attribute. The ones it styles:

| Prop | Type | Description |
| --- | --- | --- |
| `aria-invalid` | `boolean` | Draws the destructive border and tells assistive technology the value is invalid. |
| `disabled` | `boolean` | Dims the field and blocks editing. |
| `placeholder` | `string` | Example text shown while the field is empty. It is not a label. |

## Accessibility

- Every field needs a visible label: `Label` with `htmlFor`, or `aria-labelledby`.
- Ids come from `useId()`, never a literal string.
- Error text uses the `text-text-destructive` token and `role="alert"` so it is announced when it appears.
