Skip to content
nexubDesign System
v12.7.0

Components · Form & Input

Password Input

StableAdded v0.0.1

A password field with a built-in toggle to reveal or hide the entered value.

import { PasswordInput } from '@nexub/react';
View as Markdown

Playground

Props

TSX
<PasswordInput placeholder="Enter password…" />

Examples

Default

Invalid

States

  • default
  • disabled
  • invalid
  • loading
  • size="sm"
  • size="md"
  • size="lg"

Props

Props
PropTypeDefaultDescription
placeholderstring—Placeholder text shown when the field is empty.
invalidboolean—Applies error styling to indicate a validation failure.
disabledboolean—Disables the input.
size'sm' | 'md' | 'lg'—Controls font size and padding.
visibleboolean—Shows the password as text. Controlled when set; pair with onVisibleChange.
defaultVisiblebooleanfalseInitial visibility when uncontrolled. Defaults to false.
onVisibleChange((visible: boolean) => void)—Called when the reveal toggle is pressed.
clearableboolean—Shows a clear button while there is a value. Clearing fires onChange with "".
leadingAddonstring—
leadingIconReact.ReactNode—
loadingboolean—Spinner in the trailing slot and aria-busy on the input.
showCountboolean—Shows a "12/80" counter; needs maxLength. Announced politely near the limit.
trailingAddonstring—
wrapperClassNamestring—