Input
Single-line text field.
Staticimport { Input } from 'umbra-ui'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
htmlSize | number | — | Native `size` attribute (visible width in characters). |
invalid | boolean | — | Marks the value as invalid (sets `aria-invalid`). Inherited from FormField when omitted. |
size | "sm" | "md" | "lg" | md | Control height. |
Usage notes
Controlled with value / onChange, or uncontrolled with defaultValue. The native size attribute is available as htmlSize.
Accessibility
- Always give it a name: wrap it in
FormFieldor passaria-label. invalidsetsaria-invalid; inside aFormFieldwith anerrorthis happens automatically.- The control border meets 3:1 contrast against every surface in both themes.
Import
import { Input } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app