SortableList API#
Bases: AnyWidget
Drag-and-drop list widget with optional add/remove/edit affordances.
Examples:
Create a sortable list widget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Sequence[str]
|
Initial sequence of string items. |
required |
addable
|
bool
|
Allow inserting new entries. |
False
|
removable
|
bool
|
Allow deleting entries. |
False
|
editable
|
bool
|
Enable inline text editing. |
False
|
label
|
str
|
Optional heading shown above the list. |
''
|
**kwargs
|
Any
|
Forwarded to |
{}
|
Source code in wigglystuff/sortable_list.py
Synced traitlets#
| Traitlet | Type | Notes |
|---|---|---|
value |
list[str] |
Ordered list items. |
addable |
bool |
Allow inserting new items. |
removable |
bool |
Allow deleting items. |
editable |
bool |
Allow inline edits. |
label |
str |
Optional heading above the list. |