# Inputs Text inputs, textareas, selects. Single visual treatment, semantic states. Reference: `kdcvault/frontend/src/components/ui/input.tsx` and `.kdc-input` / `.kdc-input-underline` utilities in `kdcsurveyadd/app/globals.css`. ## Anatomy See `anatomy.svg`. Label · input shell · helper / error text. Label sits above the input; helper text below in `text.muted` `bodyS`. ## Variants | Token | Use | Background | Border | |-------|-----|------------|--------| | `input.default` | Standard field | `surface.background` | `border.default` (1px) | | `input.filled` | High-density forms | `surface.subtle` | none | | `input.underline` | Marketing / minimal forms | transparent | bottom 1px `border.default` | ## Sizes | Size | Height | Padding | |------|--------|---------| | `sm` | 32px | `6px 10px` | | `md` (default) | 40px | `8px 12px` | | `lg` | 48px | `12px 16px` | ## States - **Hover** — border `border.default` → `border.strong`, `120ms` transition. - **Focus-visible** — apply `elevation.focusRing`, border `brand.primary`. - **Disabled** — `opacity: 0.5`, `cursor: not-allowed`, background `surface.subtle`. - **Error** — border `semantic.danger`, helper text `semantic.danger`, focus ring `rgba(176,56,47,0.18)`. - **Read-only** — background `surface.subtle`, remove border, keep text colour. ## Tokens used `components.input.*`, `elevation.focusRing`, `colors.border.*`, `colors.semantic.danger`. ## Accessibility - Every input has a programmatically associated `