Input

A text field with a calm focus ring, three sizes and an input group for icons, prefixes and shortcuts.

Inputs

Playground

Tweak the props, the preview and the code follow.

Props
<Input placeholder="you@company.com" />

Installation

npx @plumsydev/plum-ui add input

Also pulls in kbd automatically.

Usage

import { Input, InputAddon, InputGroup } from "@/components/ui/input"
<InputGroup>
  <InputAddon><Search /></InputAddon>
  <Input placeholder="Search…" />
</InputGroup>

Examples

Input group

Wrap an Input in InputGroup and add InputAddons. The ring moves to the group and icons light up on focus.

⌘K
https://
.infraflow.app

Sizes

States

Invalid, disabled and file inputs.

API Reference

Input

Extends the native input element.

PropTypeDefault
size

Height and padding.

"sm" | "default" | "lg""default"
aria-invalid

Shows the destructive border and ring.

boolean—

InputGroup

A div that hosts the focus ring and lays out addons around the input.

InputAddon

PropTypeDefault
align

Which side of the input the addon sits on.

"start" | "end""start"

Notes

  • The default size uses a 16px font on mobile so iOS doesn’t zoom on focus.