A Streamlit custom component for selecting and reordering multiple string values.
Project description
streamlit-sortable-multiselect
A Streamlit custom component for searching, selecting, and reordering multiple string values.
Install
python -m pip install streamlit-sortable-multiselect
For local development:
python -m pip install -e ".[dev]"
For frontend development:
cd streamlit_sortable_multiselect/frontend
npm install
npm run dev
Usage
import streamlit as st
from streamlit_sortable_multiselect import sortable_multiselect
selected = sortable_multiselect(
"Favorite frameworks",
options=[
{"label": "Streamlit", "value": "streamlit", "icon_url": "https://streamlit.io/images/brand/streamlit-mark-color.png"},
{"label": "FastAPI", "value": "fastapi", "icon_url": "https://fastapi.tiangolo.com/img/favicon.png"},
{"label": "Django", "value": "django"},
{"label": "Flask", "value": "flask"},
],
default=["streamlit"],
placeholder="Search frameworks...",
show_move_buttons=True,
show_numbers=True,
base_color="#eef2ff",
order_colors={1: "#fee2e2", 2: "#dcfce7"},
)
st.write(selected)
Build the frontend before packaging or using release mode:
cd streamlit_sortable_multiselect/frontend
npm run build
Run the example app:
streamlit run examples/basic.py
Release
Build and check the distribution files:
cd streamlit_sortable_multiselect/frontend
npm install
npm run build
cd ../..
python -m pip install -e ".[dev]"
python -m build
python -m twine check dist/*
Upload to PyPI with an API token:
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_sortable_multiselect-0.5.0.tar.gz.
File metadata
- Download URL: streamlit_sortable_multiselect-0.5.0.tar.gz
- Upload date:
- Size: 114.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92e17582b15d7d321b273192a4511d6db1d10e563ea776014f0c057e7027e537
|
|
| MD5 |
c2046b9a681f39a401fb3bd340ca85b8
|
|
| BLAKE2b-256 |
8c09ba4a1d67216b9025e9bb1d465b36f06173120a326e405fab306c3dc9ed24
|
File details
Details for the file streamlit_sortable_multiselect-0.5.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_sortable_multiselect-0.5.0-py3-none-any.whl
- Upload date:
- Size: 113.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a0588425742869dbed703f60bd47565599d716c5fb287f4c8a4d8a4c8b5109
|
|
| MD5 |
b7d304f8fdc3f5ce4b3002879fa84173
|
|
| BLAKE2b-256 |
e8da4ba5cf5d24bbf2f53a1d5404f0f6591cee191f78dbce33f2a6140b63c6c8
|