PasswordInput

An eye that opens and shuts, one strength rail that fills and changes colour, a hint naming the next thing to fix, and a Caps Lock warning. Inputs.

Open playground
Use at least 8 characters

About

PasswordInput is a React component in the Inputs category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { PasswordInput } from "@ashutoshswamy/smoui" and set showStrength, label, ...FloatingInput.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { PasswordInput } from "@ashutoshswamy/smoui";

<PasswordInput name="password" showStrength />

Props 3

showStrength

Show the strength rail and the next-step hint.

booleandefault true
label

Floating label.

stringdefault "Password"
...FloatingInput props

error, hint, name, value, onChange, ref.

FloatingInputProps