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
placeholderstring—Placeholder text shown in the field
valuestring—Controlled value of the input
defaultValuestring—Initial value for an uncontrolled input
onChange(e: React.ChangeEvent<HTMLInputElement>) => void—Change handler for the underlying input
disabledbooleanfalseWhether the input is disabled