Skip to main content

Textarea

It allows you to read any word or paragraph as input.

ParameterDescriptionDefault Value
selector_nameThe name of the selector. It must be unique.-
labelThe label for the selector. If not passed, the selector shows its selector_name.-
default_valueIf selected option is invalid or not defined, use this value.-
allowed_valuesList of valid values. If passed, this input will ignore other input values and use the default-
placeholderShort hint displayed in the input field before the user enters a value.-
help_textTooltip help message displayed while the input is focused.-
run_on_changeIf False is passed, changes in this selector will not trigger execution.True
allow_clearIf True, allow remove input content with clear icon.False
show_buttonIf True, the input will include a button to confirm selection.False
button_labelIf passed and showButton is True, this will set the button text.-
button_colorIf passed and showButton is True, this will set the button text color.-
button_backgroundIf passed and showButton is True, this will set the button background color.-
rowsRows of the textarea.2
colsCols of the textarea.6
block_uuidOptional 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.