Forms

Input

The single-line text field: a soft filled pill with a ring on focus and a red ring when invalid.

packages/design-system/components/ui/input.tsx

Examples

Default
With a label
Invalid
Disabled
File
On black

Anatomy

  1. 01Filled pill, bg-input/50
  2. 02Placeholder, muted
  3. 03Focus ring, ring/30

Usage

import { Input } from "@repo/design-system/components/ui/input";

<Input type="email" id="email" placeholder="you@company.com" />

Props

PropTypeDefaultDescription
typeHTMLInputTypeAttributenoneAny native type. File inputs get a flat button.
aria-invalidbooleannoneTurns the border and ring destructive.
...propsComponentProps<"input">noneAny input attribute; it renders Base UI's Input.
classNamestringnoneMerged last with cn(). Use it for layout (width, margin), not to restyle the component.

Guidance

Do

  • Pair it with a FieldLabel, or give it an aria-label.
  • Use the right type so phones show the right keyboard.

Don't

  • Use placeholder text as the label.

Where it's used