Utility
Terminal
█
password-input-demo █
Loading preview... █
█
█
█
█
█
█
█
█
█
█
█
█
█
█
█Installation
$ pnpm dlx shadcn@latest add @termcn/opentui/password-input
Usage
import { PasswordInput } from "@/components/ui/password-input";<PasswordInput
label="Password"
placeholder="Enter password"
showToggle
onSubmit={(value) => console.log("Password:", value)}
/>API Reference
PasswordInput
| Prop | Type | Default |
|---|---|---|
value | string | - |
onChange | (value: string) => void | - |
onSubmit | (value: string) => void | - |
placeholder | string | "" |
mask | string | "●" |
showToggle | boolean | false |
label | string | - |
id | string | - |
borderStyle | "single" | "double" | "round" | "bold" | "singleDouble" | "doubleSingle" | "classic" | "round" |
paddingX | number | 1 |
width | number | - |
cursor | string | "█" |