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 inputAlso 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.
| Prop | Type | Default |
|---|---|---|
sizeHeight and padding. | "sm" | "default" | "lg" | "default" |
aria-invalidShows the destructive border and ring. | boolean | — |
InputGroup
A div that hosts the focus ring and lays out addons around the input.
InputAddon
| Prop | Type | Default |
|---|---|---|
alignWhich 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.