🧪 We're running a cheminformatics notebook competition!

Enter by October 4
45 / 104
SortableList

SortableList

by marimo team

A draggable list for reordering items interactively.

About this notebook

This notebook shows the SortableList widget from the wigglystuff library. It imports marimo and SortableList from wigglystuff. The notebook creates a short demo list with three string items: "a", "b", and "c". It wraps the widget with mo.ui.anywidget so marimo can render it and read its state.

The widget starts with editable, addable, and removable options all set to true. You reorder the items by dragging them into a new order. You edit an item text in place. You add a new item, and you remove an item you no longer want. The list carries the label "My Sortable List". A separate cell reads widget.value.get("value") and shows the current list. This value updates when you change the list.

Related notebooks