# dialog/password Open a masked text input dialog (for secrets). ## Syntax
[dialog/password "Title" ?default]
## Parameters - `"Title"` — dialog title (defaults to `"Password"`) - `?default` — optional pre-filled text (masked) ## Examples
[dialog/password "Token"]
[dialog/password "API Key" "sk-"]
[dialog/password %{ :title "Token" :default "" }]
[dialog/password :api-key "Token"]               # explicit id → :data~id :api-key
## Returns In TUI hosts the call returns immediately — `true` when an explicit id was given (leading keyword or `:id` in the spec map), else the numeric request-id. Behavior depends on the build: - TUI (`retro`, `retra`) — returns immediately; the result arrives later as a `:message` event with topic `"dialog-result"` and a structured `:data` map `%{ :id :value :cancelled }` where `:value` carries the entered string (empty when cancelled). - `deft` scripting binary — blocks on stdin and returns the entered text. ## See Also `dialog/prompt`, `dialog/confirm`, `dialog/msgbox`