Skip to content

Interface InteractiveListConfig ​

Source: interactiveListPrompt.ts

Configuration for interactiveListPrompt.

Properties ​

message ​

message: string

The message to display at the top of the list.


choices ​

choices: InteractiveListChoice[]

The list of choices.


default? ​

optional default?: string | null

The default value to select. Defaults to the first choice. A value of null represents no selection.


renderSelected? ​

optional renderSelected?: (choice: InteractiveListChoice, index: number) => string

Function that renders the selected choice.

Parameters ​

choice ​

InteractiveListChoice

index ​

number

Returns ​

string


renderUnselected? ​

optional renderUnselected?: (choice: InteractiveListChoice, index: number) => string

Functions that renders the unselected choices.

Parameters ​

choice ​

InteractiveListChoice

index ​

number

Returns ​

string


hideCursor? ​

optional hideCursor?: boolean

Whether to hide the cursor during selection.

Default ​

ts
true

alignShortcuts? ​

optional alignShortcuts?: boolean

Whether to horizontally align the shortcuts in the list of choices.

Default ​

ts
false

Built by Prozilla