Form

PasswordInput

Secure text input with show/hide toggle.

Available inreactangular

Preview

Live previewreal component

Install

TerminalBash
npx mcp-elements add password-input

Usage

password-input-example.tsxTSX
import { PasswordInput } from '@mcp-elements/react'

export function Example() {
  return <PasswordInput placeholder="Enter API key" />
}

Props

PropTypeDefaultDescription
placeholderstringPlaceholder text shown in the field
valuestringControlled value of the input
defaultValuestringInitial value for an uncontrolled input
onChange(e: React.ChangeEvent<HTMLInputElement>) => voidChange handler for the underlying input
disabledbooleanfalseWhether the input is disabled