Comment on page
Multiselect
result, _ := pterm.DefaultInteractiveMultiselect.
WithOptions([]string{"a", "b", "c", "d"}).
Show()
pterm.Info.Printfln("You answered: %s", result)
Name | Type | Description |
---|---|---|
DefaultText | string | Default prompt text |
TextStyle | *Style | Style of the prompt text |
Options | []string | List of menu options |
OptionStyle | *Style | Style of menu options |
DefaultOptions | []string | Options, which should be selected by default |
MaxHeight | int | Maximum number of visible options at once (the others can be accessed by scrolling) |
Selector | string | Character of the selector |
SelectorStyle | *Style | Style of the Selector |
Method | Description |
---|---|
Show(text) | Displays the interactive multiselect menu |
pkg.go.dev contains the full specification for this printer and more technical descriptions.
Last modified 1yr ago