InputOTP
One-time code / PIN as separate slots.
Single-line text entry for forms and filters. Optional start and end slots sit inside the field; a kit Button or Select can join its edge.
Single-line text in lg, md, and sm. Field label sits on top or start (left). start and iconStart are prefix slots inside the control. action and affix join a kit Button or Select to the edge. No InputGroup cousin.
Email with an icon and hint, a password error, and search with a shortcut chip. Medium size, label on top. Variants shows a start label, slots, actions and the large size.
We'll send receipts to this address.
Wrap with Field. labelPosition top or start (left). start and iconStart are prefix slots inside the control, not the Field label.
import { Input } from "agentic-ds-kit";From contracts/input.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| describedBy | string | No | — | Id(s) for aria-describedby on the input. Field passes its hint or error id. |
| id | string | Yes | — | — |
| type | text | email | password | search | No | text | — |
| size | lg | md | sm | No | md | — |
| placeholder | string | No | — | — |
| disabled | boolean | No | false | — |
| error | boolean | No | false | — |
| defaultValue | string | No | — | — |
| name | string | No | — | — |
| start | string | No | — | Prefix text inside the field on the left. Not a label. |
| end | string | No | — | Suffix text inside the field on the right. Not a label. |
| iconStart | KitIcon | No | — | Left icon. A curated Lucide name (PascalCase or kebab-case) renders instantly; any other Lucide name needs import "agentic-ds-kit/icons-on-demand" once (otherwise it is skipped with a dev warning). Or pass the Lucide component (Plus) or an element. |
| iconEnd | KitIcon | No | — | Right icon. A curated Lucide name (PascalCase or kebab-case) renders instantly; any other Lucide name needs import "agentic-ds-kit/icons-on-demand" once (otherwise it is skipped with a dev warning). Or pass the Lucide component (Plus) or an element. |
| demo | hover | focus | No | — | playground only |
| value | string | No | — | controlled. When set, do not also rely on defaultValue. |
| onChange | function | No | — | (value: string) => void |
| ariaLabel | string | No | — | When there is no Field label, such as search inside DropdownMenu. |
| action | "copy" | InputActionButton | No | — | Kit Button joined to the end edge, the same size as the Input, appearance outline mode neutral. "copy" copies the value and shows the copied label for a moment, with a polite live region. Or { label, icon?, onClick, loading? }: label is the visible words and the name. Not the form's submit. |
| affix | InputAffix | No | — | Kit Select joined to one side: { side: "start" | "end", ariaLabel, options, value?, defaultValue?, onChange?, name? }. Its id is {id}-affix and ariaLabel names it (Country code). For phone and country codes only. When action is set too, an end affix is skipped. |
| passwordToggle | boolean | No | false | type=password only. An eye button inside the field shows or hides the value. Named by KitLabels showPassword with aria-pressed. Takes the iconEnd slot. |