express.ui.input_password

express.ui.input_password(id, label, value='', *, width=None, placeholder=None)

Create an password control for entry of passwords.

Parameters

id : str

An input id.

label : TagChild

An input label.

value : str = ''

Initial value.

width : Optional[str] = None

The CSS width, e.g., ‘400px’, or ‘100%’.

placeholder : Optional[str] = None

The placeholder of the input.

Returns

: Tag

A UI element.

Notes

Server value

A string of the password input. The default value is unless value is provided.

See Also

Examples

#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400

## file: app.py
from shiny import reactive
from shiny.express import input, render, ui

ui.input_password("password", "Password:")
ui.input_action_button("go", "Go")


@render.code
@reactive.event(input.go)
def value():
    return input.password()