input¶
A control that displays some text that can potentially be edited.
Properties¶
Name | Type | Default | Description |
---|---|---|---|
(★) |
dynamic(any) | None | The value represented by this control. |
password |
bool | False | If True, the text is obscured: all input characters are displayed as an asterisk ('*'). |
label |
str | None | The label associated with the input. |
multiline |
bool | False | If True, the text is presented as a multi line input. |
lines_shown |
int | 5 | The height of the displayed element if multiline is True. |
change_delay |
int | App config | Minimum time between triggering two calls to the on_change callback. |
on_action |
Callback | Name of a function that is triggered when a specific key is pressed.
|
|
action_keys |
str | "Enter" | Semicolon (';')-separated list of supported key names. |
on_change |
Callback | The name of a function that is triggered when the value is updated.
|
|
propagate |
bool | App config | Allows the control's main value to be automatically propagated. |
(★)value
is the default property for this visual element.
Styling¶
All the input controls are generated with the "taipy-input" CSS class. You can use this class name to select the input controls on your page and apply style.
Stylekit support¶
The Stylekit provides a specific class that you can use to style input controls:
- fullwidth
If an input control uses the fullwidth class, then it uses the whole available horizontal space.
Usage¶
Get user input¶
You can create an input field bound to a variable with the following content:
Page content
<|{value}|input|>
<taipy:input>{value}</taipy:input>