Skip to content

login class

A control that lets users enter their username and password.

Methods

__init__()

__init__(
    title="Log in",
    on_action=None,
    message=None,
    id=None,
    properties=None,
    class_name=None,
    hover_text=None,
) -> None

Create a new login element.

Parameters:

Name Type Description Default

title

str

The title of the login dialog.

Log in

on_action

Union[str, Callable]

A function or the name of a function that is triggered when the dialog button is pressed.

This function is invoked with the following parameters:

  • state (State): the state instance.
  • id (str): the identifier of the button if it has one.
  • payload (dict): the details on this callback's invocation.
    This dictionary has the following keys:
    • action: the name of the action that triggered this callback.
    • args: a list with three elements:
      • The first element is the username
      • The second element is the password
      • The third element is the current page name

When the button is pressed, and if this property is not set, Taipy will try to find a callback function called on_login() and invoke it with the parameters listed above.


None

message

str
dynamic

The message shown in the dialog.

None

id

str

The identifier that is assigned to the rendered HTML component.

None

properties

dict[str, Any]

Bound to a dictionary that contains additional properties for this element.

None

class_name

str
dynamic

The list of CSS class names that are associated with the generated HTML Element.
These class names are added to the default taipy-login class name.

None

hover_text

str
dynamic

The information that is displayed when the user hovers over this element.

None