Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a way to completely hide password from Input #130

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions field_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ func (i *Input) Password(password bool) *Input {
return i
}

// ExtraHiddenPassword sets whether or not to hide the input while the user is typing.
// Like Password but in this case without displaying mark on each character.
func (i *Input) ExtraHiddenPassword(password bool) *Input {
if password {
i.textinput.EchoMode = textinput.EchoNone
} else {
i.textinput.EchoMode = textinput.EchoNormal
}
return i
}

// Placeholder sets the placeholder of the text input.
func (i *Input) Placeholder(str string) *Input {
i.textinput.Placeholder = str
Expand Down