A multi-step wizard component for Streamlit with validation and progress tracking
Project description
streamlit-stepper
A multi-step wizard component for Streamlit. Define steps with typed fields, get built-in validation, animated progress connectors, a summary review step, and the final collected values back in Python.
Features
- Horizontal (tabs across top) and vertical (sidebar) orientations — switchable at runtime
- Animated fill connector between steps as you progress
- Per-field required validation — blocks Next and shows inline error hints
- Click completed steps to jump back
- Auto-generated review step that summarizes all entries
- Completion screen with collected values
- Dot-strip navigation at the bottom of each step
- Zero runtime dependencies beyond Streamlit
Installation
pip install streamlit-stepper
Quickstart
import streamlit as st
from streamlit_stepper import st_stepper
steps = [
{
"label": "Project",
"subtitle": "Name & describe",
"icon": "◈",
"fields": [
{
"key": "name",
"label": "Project name",
"type": "text",
"placeholder": "e.g. Apollo Dashboard",
"required": True,
},
{
"key": "type",
"label": "Project type",
"type": "select",
"options": ["Web App", "Data Pipeline", "ML Model", "API Service"],
"required": True,
},
],
},
{
"label": "Team",
"subtitle": "Add collaborators",
"icon": "◉",
"fields": [
{
"key": "owner",
"label": "Owner email",
"type": "text",
"placeholder": "you@company.com",
"required": True,
},
{
"key": "size",
"label": "Team size",
"type": "select",
"options": ["Solo", "2–5", "6–15", "15+"],
"required": True,
},
],
},
{
"label": "Review",
"subtitle": "Confirm & launch",
"icon": "◆",
"fields": [], # empty fields = auto review step
},
]
result = st_stepper(steps, orientation="horizontal", key="wizard")
if result and result["completed"]:
st.balloons()
st.success(f"Created project: {result['values']['name']}")
st.json(result["values"])
API
st_stepper(steps, orientation="horizontal", key=None)
| Parameter | Type | Default | Description |
|---|---|---|---|
steps |
list[dict] |
required | Step definitions |
orientation |
"horizontal" | "vertical" |
"horizontal" |
Layout of the step indicator |
key |
str |
None |
Streamlit widget key |
Step schema
{
"label": str, # short name in the indicator (e.g. "Project")
"subtitle": str, # secondary text below label
"icon": str, # decorative character (e.g. "◈", "①", "→")
"fields": [
{
"key": str, # returned in result["values"]
"label": str, # field display label
"type": str, # "text" | "textarea" | "select"
"placeholder": str, # optional hint text
"required": bool, # if True, blocks Next when empty
"options": list[str], # required for type="select"
}
]
}
A step with "fields": [] renders as a review summary of all prior steps.
Return value
{
"step": int, # index of the last completed step
"values": dict, # {field_key: entered_value} for all fields
"completed": bool, # True when user clicks the final submit button
}
Development
git clone https://github.com/RhythrosaLabs/streamlit-stepper
cd streamlit-stepper
cd streamlit_stepper/frontend
npm install
npm start # dev server on :3003
# separate terminal
cd ../..
pip install -e .
# Set _RELEASE = False in streamlit_stepper/__init__.py
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
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_stepper-0.1.1.tar.gz.
File metadata
- Download URL: streamlit_stepper-0.1.1.tar.gz
- Upload date:
- Size: 410.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c09f86325e699765dec0183dd707aa903ae32ad8e298a54226ccb9a8288b9ee0
|
|
| MD5 |
19dbb68b716a019a3ee91589bab03cd2
|
|
| BLAKE2b-256 |
1ec15dfbd5448b5c32bf7a626b7c6bc9224866c3f24b1655780de84161537486
|
File details
Details for the file streamlit_stepper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: streamlit_stepper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 412.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
437202e038685227a4ea453898e5256cb40956a3069798fdb3bdc39ecfc143b5
|
|
| MD5 |
bdcc06095dacdb89cce645fb4d104997
|
|
| BLAKE2b-256 |
e191a5c991aad9c56d34873fa48545a6547340e096c38b591533b52decc5d9cf
|