Password Input

A specialized input component for passwords with a built-in visibility toggle.

Installation

$ npx shadcn@latest add "/r/password-input.json"

Usage

Sizes

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"The size of the input.
errorbooleanfalseWhether the input is in an error state.
disabledbooleanfalseWhether the input is disabled.
classNamestring-Additional CSS classes for the input element.
wrapperClassNamestring-Additional CSS classes for the wrapper div (use for width constraints).