TextInput

Basic Usage

result, _ := pterm.DefaultInteractiveTextInput.Show()
pterm.Info.Printfln("You answered: %s", result)

Options

Name
Type
Description
TextStyle
*Style
Style of the text prompt
DefaultText
string
Default prompt text
MultiLine
bool
Sets if the input should accept multiple lines of text

Using Options

Methods

Method
Description
Show(text)
Displays the interactive text input field

Full Specification

pkg.go.dev contains the full specification for this printer and more technical descriptions.
pterm package - github.com/pterm/pterm - Go Packages
Last modified 3mo ago
Copy link
Edit on GitHub
On this page
Basic Usage
Options
Using Options
Methods
Full Specification