Skip to content
Aback UI

Input

A single-line text control aligned to the 36px control grid.

StableUsed in Aback Tools, Aback LaunchRegistry JSON (opens in a new tab)

We only use this for receipts.

Installation

Copy the source with the CLI to own and edit it, or import it from the npm package.

npx aback-ui@latest add input

Writes components/ui/input.tsx. First time in this project? Run npx aback-ui@latest init first, as the installation guide shows.

Usage

Import the parts you need from the installed file. The Code tab above has a complete, working example.

tsx
import { Input, inputClassName } from "@/components/ui/input";

API reference

Props and composition points for Input. Native element props pass through.

PropTypeDefaultDescription
type"text" | "email" | "password" | "number" | ..."text"Native input type. Use number with inputMode for numeric keyboard hints.
aria-invalidboolean | "true" | "false"NoneTurns the border destructive and pairs with a Field error.
disabledbooleanNonePrevents interaction and reduces opacity.
classNamestringNoneLayout adjustments only; control height and focus stay on the system grid.

Dependencies: no extra packages, plus the shared @/lib/utils helper.

Accessibility

Semantics, keyboard behavior, and the decisions that keep the component operable.

  • Always pair with a visible Label or Field. Placeholders disappear and are not a substitute.
  • Error text must be associated through aria-describedby and the control marked aria-invalid.
  • The control keeps native autofill, form submission, and mobile keyboard behavior.
  • Do not use opacity on entered text or value text.

Used in production

The Aback products whose interfaces shaped this component.