prompt
prompt(
message,defaultValue?,opts?):Promise<string>
Defined in: components/dialog.ts:309
Shows a prompt dialog with a text input. Returns a Promise<string | null> —
the entered string if the user confirmed, or null if cancelled.
Parameters
Section titled “Parameters”message
Section titled “message”string
defaultValue?
Section titled “defaultValue?”string = ""
Partial<DialogOptions> = {}
Returns
Section titled “Returns”Promise<string>
Example
Section titled “Example”const name = await S.prompt("Enter your name:", "Alice");if (name !== null) S.alert(`Hi ${name}!`);