Umbra UI

Input

Single-line text field.

Staticimport { Input } from 'umbra-ui'

Props

PropTypeDefaultDescription
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"mdControl 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 FormField or pass aria-label.
  • invalid sets aria-invalid; inside a FormField with an error this 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