A Streamlit custom component for rendering a draggable list and returning user interaction back to Python.
- Drag-and-drop list UI inside Streamlit
- Simple Python API via
my_component - Works as an embeddable custom Streamlit component
my_component/- Python wrapper and frontend bundlemy_component/frontend/- frontend source codemy_component/example.py- minimal usage example
This package is currently intended for local/development usage.
git clone https://github.com/dschiese/draggableList.git
cd draggableList
pip install -e .import streamlit as st
from my_component import my_component
items = ["A", "B", "C"]
result = my_component("Demo", items, key="demo-list")
st.write("Component result:", result)Run the demo:
streamlit run my_component/example.pyInstall dev dependencies (optional):
pip install -e .[devel]Frontend dependencies are managed in my_component/frontend/package.json.
MIT (see LICENSE).