PasswordInput#

Download this notebook from GitHub (right-click to download).


import panel as pn
pn.extension()

The PasswordInput allows entering any string using an obfuscated text input box.

For more information about listening to widget events and laying out widgets refer to the widgets user guide. Alternatively you can learn how to build GUIs by declaring parameters independently of any specific widgets in the param user guide. To express interactivity entirely using Javascript without the need for a Python server take a look at the links user guide.

Parameters:#

For layout and styling related parameters see the customization user guide.

Core#

  • value (str): The current value updated when pressing <enter> key.

  • value_input (str): The current value updated on every key press.

Display#

  • disabled (boolean): Whether the widget is editable

  • max_length (int): The maximum number of allowed characters.

  • name (str): The title of the widget

  • placeholder (str): A placeholder string displayed when no value is entered


password_input = pn.widgets.PasswordInput(name='Password', placeholder='Enter your password here...')
password_input

PasswordInput.value returns a string type that can be read out and set like other widgets:

password_input.value
''

Controls#

The PasswordInput widget exposes a number of options which can be changed from both Python and Javascript. Try out the effect of these parameters interactively:

pn.Row(password_input.controls(jslink=True), password_input)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).