Textarea
It allows you to read any word or paragraph as input.
| Parameter | Description | Default Value |
|---|---|---|
| selector_name | The name of the selector. It must be unique. | - |
| label | The label for the selector. If not passed, the selector shows its selector_name. | - |
| default_value | If selected option is invalid or not defined, use this value. | - |
| allowed_values | List of valid values. If passed, this input will ignore other input values and use the default | - |
| placeholder | Short hint displayed in the input field before the user enters a value. | - |
| help_text | Tooltip help message displayed while the input is focused. | - |
| run_on_change | If False is passed, changes in this selector will not trigger execution. | True |
| allow_clear | If True, allow remove input content with clear icon. | False |
| show_button | If True, the input will include a button to confirm selection. | False |
| button_label | If passed and showButton is True, this will set the button text. | - |
| button_color | If passed and showButton is True, this will set the button text color. | - |
| button_background | If passed and showButton is True, this will set the button background color. | - |
| rows | Rows of the textarea. | 2 |
| cols | Cols of the textarea. | 6 |
| block_uuid | Optional value to specify the block that will be executed when the selector triggers execution. | (current block uuid) |
Example:
sel_1 = selectors.Textarea(
'textarea_0',
label='Textarea Text:',
help_text='your help text',
default_value='ipsum',
show_button=True,
button_text='Do it!',
)
sel_1.render()
print('Introduced text:', sel_1.value)
Another example:
sel_1 = selectors.Textarea(
'selector_value',
label='Valor:',
default_value='Default value 1',
button_label='Save',
run_on_change=False,
run_all_on_change=False,
rows=4,
cols=49
)
sel_1.render()
sel_2 = selectors.Textarea(
'selector_comment',
label='Comments:',
default_value='Default value 2',
button_label='Save',
run_on_change=False,
run_all_on_change=False,
rows=4,
cols=48
)
sel_2.render()
select_6 = selectors.Button('Run')
select_6.render()
print(f"Value: {sel_1._value} Comments: {sel_2._value}")
See also
- Search Bar — a related single-line text input.
- All selector types — the full catalog of available selector controls.
- Selectors — common arguments and how to define, render, and read selectors.