TextArea¶
pywry.toolbar.TextArea
¶
Bases: ToolbarItem
A multi-line text area that supports resizing and paste.
Emits {value: ..., componentId: ...} on input change.
The textarea is resizable in all directions by default. Use the resize attribute to control resize behavior.
| ATTRIBUTE | DESCRIPTION |
|---|---|
value |
Initial text content (default: "").
TYPE:
|
placeholder |
Placeholder text shown when empty (default: "").
TYPE:
|
debounce |
Milliseconds to debounce input events (default: 300).
TYPE:
|
rows |
Initial number of visible text rows (default: 3).
TYPE:
|
cols |
Initial number of visible columns (default: 40).
TYPE:
|
resize |
CSS resize behavior: "both", "horizontal", "vertical", or "none" (default: "both").
TYPE:
|
min_height |
Minimum height CSS value (e.g., "50px").
TYPE:
|
max_height |
Maximum height CSS value (e.g., "500px").
TYPE:
|
min_width |
Minimum width CSS value (e.g., "100px").
TYPE:
|
max_width |
Maximum width CSS value (e.g., "100%").
TYPE:
|
Examples:
>>> TextArea(
... label="Notes:",
... event="notes:update",
... placeholder="Enter your notes here...",
... rows=5,
... resize="vertical",
... )
Functions¶
auto_generate_component_id
¶
auto_generate_component_id() -> ToolbarItem
Auto-generate component_id based on type if not provided.
validate_event_name
classmethod
¶
Validate event follows namespace:event-name pattern.