Input

Animated form field with a floating label, a focus glow, and a shake-on-error animation.

@akex/input

Installation

npm install @akex/input

Usage

import { Input } from "@akex/input";

<Input label="Email" type="email" />
<Input label="Password" error="Too short" />
<Input label="Username" helperText="Letters and numbers only" />

Try it — type an email without an @

We'll never share your email

As it appears on your ID

Variants

Sizes

Props

PropTypeDefaultDescription
labelstringFloating label rendered inside the field
errorstringError message — triggers shake + destructive styling
helperTextstringHint shown below the field when there is no error
variantstring"default""default" | "filled" | "ghost"
inputSizestring"default""sm" | "default" | "lg"
...propsInputHTMLAttributesAll native input attributes (value, onChange, type…)