Text input
textual_wizard.inputs.Text
Text(
name: str,
label: str,
*,
validators: Optional[list[Validator]] = None,
placeholder: Optional[str] = None,
initial_value: Optional[str] = None,
allow_blank: bool = False,
default_value: Optional[FieldValueType] = None
)
Bases: BaseText[str]
Input widget allowing text to be entered without any restrictions.
PARAMETER | DESCRIPTION |
---|---|
name |
The input identifier, used as key in the returned
TYPE:
|
label |
The title of the input, displayed to the user.
TYPE:
|
validators |
A list of Textual validators, allowing the user to pass to the next question or displaying an error.
TYPE:
|
placeholder |
Placeholder for the text field.
TYPE:
|
initial_value |
Initial value entered in the input.
TYPE:
|
allow_blank |
Whether or not the text field is considered valid when is it empty.
TYPE:
|
default_value |
The value returned by the input if allow_blank is set to True and the input is empty.
TYPE:
|
inq_ask
Asks a question using Inquirer instead of the Textual User Interface.