• Public
  • Public/Protected
  • All

Interface InputBoxOptions

Options to configure the behavior of the input box UI.


  • InputBoxOptions



Optional title

title: string

An optional string that represents the title of the input box.

Optional value

value: string

The value to prefill in the input box.

Optional valueSelection

valueSelection: [number, number]

Selection of the prefilled value. Defined as tuple of two number where the first is the inclusive start index and the second the exclusive end index. When undefined the whole word will be selected, when empty (start equals end) only the cursor will be set, otherwise the defined range will be selected.

Optional prompt

prompt: string

The text to display underneath the input box.

Optional placeHolder

placeHolder: string

An optional string to show as placeholder in the input box to guide the user what to type.

Optional password

password: boolean

Controls if a password input is shown. Password input hides the typed text.

Optional ignoreFocusOut

ignoreFocusOut: boolean

Set to true to keep the input box open when focus moves to another part of the editor or to another window. This setting is ignored on iPad and is always false.


Optional validateInput

  • validateInput(value: string): undefined | null | string | Thenable<undefined | null | string>
  • An optional function that will be called to validate input and to give a hint to the user.


    • value: string

      The current value of the input box.

    Returns undefined | null | string | Thenable<undefined | null | string>

    A human-readable string which is presented as diagnostic message. Return undefined, null, or the empty string when 'value' is valid.

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹