Skip to main content

A drag-and-drop Kanban board component for Streamlit

Project description

streamlit-kanban

A drag-and-drop Kanban board component for Streamlit. Move cards between columns, add and edit cards with tags and priority levels, and get the full board state back as JSON.

Kanban screenshot

Features

  • Drag-and-drop cards between columns (native HTML5, no external DnD lib)
  • Click any card to edit title, tag, and priority
  • Add cards to any column
  • Color-coded tag and priority badges
  • Progress bar tracking Done / Total
  • Export board state as JSON
  • Zero runtime dependencies beyond Streamlit

Installation

pip install streamlit-kanban

Quickstart

import streamlit as st
from streamlit_kanban import st_kanban

columns = [
    {
        "id": "todo",
        "title": "To Do",
        "color": "#6366f1",
        "cards": [
            {"id": "c1", "title": "Write tests",    "tag": "Dev",    "priority": "high"},
            {"id": "c2", "title": "Update docs",    "tag": "Docs",   "priority": "low"},
        ],
    },
    {
        "id": "in-progress",
        "title": "In Progress",
        "color": "#f59e0b",
        "cards": [
            {"id": "c3", "title": "Build auth flow", "tag": "Dev", "priority": "high"},
        ],
    },
    {
        "id": "done",
        "title": "Done",
        "color": "#10b981",
        "cards": [],
    },
]

st.title("My Project Board")

if "board" not in st.session_state:
    st.session_state.board = columns

result = st_kanban(st.session_state.board, key="kanban")

if result:
    st.session_state.board = result

API

st_kanban(columns, key=None)
Parameter Type Description
columns list[dict] Column definitions (see schema below)
key str Streamlit widget key

Returns: Updated columns list on any interaction, None on first render.

Column schema

{
    "id":    str,          # unique identifier
    "title": str,          # display name
    "color": str,          # hex accent color for the column dot
    "cards": [
        {
            "id":       str,   # unique card id
            "title":    str,   # card text
            "tag":      str,   # e.g. "Dev", "Design", "Bug"
            "priority": str,   # "high" | "medium" | "low"
        }
    ]
}

Development

git clone https://github.com/RhythrosaLabs/streamlit-kanban
cd streamlit-kanban

# Frontend
cd streamlit_kanban/frontend
npm install
npm start          # dev server on :3001

# Python (separate terminal)
cd ../..
pip install -e .
# In streamlit_kanban/__init__.py, set _RELEASE = False
streamlit run example.py

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit_kanban-0.1.1.tar.gz (406.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_kanban-0.1.1-py3-none-any.whl (409.3 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_kanban-0.1.1.tar.gz.

File metadata

  • Download URL: streamlit_kanban-0.1.1.tar.gz
  • Upload date:
  • Size: 406.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for streamlit_kanban-0.1.1.tar.gz
Algorithm Hash digest
SHA256 686b836675d9713853a61aa16fa8ecd3986dc0b0b27b0b3256d1ebfd57fe40e6
MD5 c6bb4395db54b49fa2cb3b60191f495f
BLAKE2b-256 b14e68e2ba83c2f8391fdb821cdd37b47c761433266f3abba5c64c7cc3c96604

See more details on using hashes here.

File details

Details for the file streamlit_kanban-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_kanban-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3eba22aa2416638f5477b66bb63fae59e12439644cf5415c4819fe5022c4da98
MD5 9eb3b39c70f808cfd3ef3cecba85a4e5
BLAKE2b-256 d2fa9d7bb41d5854da700c274ed1c3e2be266e9a41542dce647199d36b7696eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page