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.3.0.tar.gz (408.8 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.3.0-py3-none-any.whl (411.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: streamlit_kanban-0.3.0.tar.gz
  • Upload date:
  • Size: 408.8 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.3.0.tar.gz
Algorithm Hash digest
SHA256 f948d0babd8b00d726e9992884ca22be9a30d3d3d4e22693ceeb83121a0860e7
MD5 deab8b00b958d1bdbdb4380f18d1afdb
BLAKE2b-256 630c1c673908ce61702b526a3be2e350b6e245a7b0990f2043506f5d8c67cd1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_kanban-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d5ef7961670b99bb1acd49484386fd69e146ad40bd5fa22ed822678bc6d564a
MD5 3c44347eb56b9e3e2b811dbacdb286a3
BLAKE2b-256 d0f95316aff024cd14aeb76d1e4d87f7aba36cb407f4323b09297a60bc920d39

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