ListInput
Repeatable list of input components that can be dynamically added or removed.
Signature
def ListInput(
key: str,
template: Union[Template, TemplateFunction],
min: int = 0,
max: int = None,
hint: str = None,
add_button_text: str = '+',
full_width: bool = False,
required: bool = True,
disabled: bool = False,
errors: Union[List[str], str] = None
)
Parameters
Name | Description | Type | Default |
---|---|---|---|
key (required) | Identifier for the widget. | str | None |
template (required) | Template or function that returns a template for each list item. | Union[Template, TemplateFunction] | None |
min | Minimum number of items required. | int | 0 |
max | Maximum number of items allowed. | int | None |
hint | Help text displayed below the input. | str | None |
add_button_text | Text displayed on the button to add a new item. | str | '+' |
full_width | Whether the input should take up the full width of its container. | bool | False |
required | Whether at least one item is required. | bool | True |
disabled | Whether the input is non-interactive. | bool | False |
errors | Pre-defined validation error messages to display. | Union[List[str], str] | None |