Form
PasswordInput
Secure text input with show/hide toggle.
Available in
reactangularPreview
Live previewreal component
Install
TerminalBash
npx mcp-elements add password-inputUsage
password-input-example.tsxTSX
import { PasswordInput } from '@mcp-elements/react'
export function Example() {
return <PasswordInput placeholder="Enter API key" />
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | — | Placeholder text shown in the field |
value | string | — | Controlled value of the input |
defaultValue | string | — | Initial value for an uncontrolled input |
onChange | (e: React.ChangeEvent<HTMLInputElement>) => void | — | Change handler for the underlying input |
disabled | boolean | false | Whether the input is disabled |