:camera: streamlit-tour
A Driver.js integration for Streamlit - add beautiful, interactive guided tours to your Streamlit apps with a single Python call.
Features
- :link: Bind tour steps to any Streamlit widget by its
key - :window: Element-free info steps - show contextual popups not anchored to any component
- :white_check_mark: One-time tours - automatically skip tours the user has already completed (via
localStorage) - :leftwards_arrow_with_hook: State feedback - know exactly when a tour was finished, dismissed, or skipped
- :art: Configurable - control overlay opacity, animations, progress indicators, and popover alignment
Installation
pip install streamlit-tour
Or in a more modern way:
uv add streamlit-tour
Quickstart
import streamlit as st
from streamlit_tour import Tour
st.title("My App")
st.text_input("Name", key="name_input")
tour = Tour(
steps=[
Tour.bind("name_input", title="Your Name", desc="Enter your name here."),
Tour.info(title="That's it!", desc="You're ready to go."),
]
)
tour.start()
Usage
Tour.start()
Launches the tour. Call this inside any conditional block (e.g. a button click) or make sure to specify one_time_tour=True.
Tour.result
Stores a TourStatus object with the tour's current state:
| Key | Type | Description |
|---|---|---|
currentStep |
int |
Last step index the user reached |
dismissed |
bool |
True if the user closed the tour before finishing |
finished |
bool |
True if the user completed all steps |
skipped |
bool |
True if the tour was skipped (one-time, already seen) |
Tour.bind()
Attaches a tour step to a Streamlit widget via its key.
Tour.bind(
key="my_widget_key", # Must match the widget's key= argument
title="Step Title",
desc="Step description text.",
side="bottom", # "top" | "bottom" | "left" | "right" (optional)
align="center", # "start" | "center" | "end" (optional)
)
How it works:
Tour.bindresolves the widget using Streamlit's.st-key-<key>CSS class, which is automatically injected on any widget that has akey=argument.
Tour.info()
Creates a floating step with no element anchor - useful for introductory or summary slides.
Tour.info(
title="Welcome!",
desc="This tour will walk you through the main features of this app.",
)
One-Time Tour
Set one_time_tour=True to automatically skip the tour for users who have already seen it. Completion is tracked in the browser's localStorage using the tour's key.
Tour.start(
steps=[...],
one_time_tour=True,
key="onboarding_tour", # Must be unique and stable across reruns
)
To reset the tour (e.g. for testing), clear localStorage in your browser's DevTools, or use a different key.
Check out example.py file for a complete example of usage.
Tips
- Always provide a
keywhen usingone_time_tour=Trueor when you have multiple tours on the same page. - Widgets must have a
key=argument forTour.bind()to locate them. Anonymous widgets (nokey) are not bindable. - Re-triggering a tour: Change the
keyvalue between Streamlit reruns to force the tour to restart. - Column layouts: Use
sideandalignonTour.bind()to control which side the popover appears on narrow widgets.
Roadmap / Possible Improvements
- Better output - make the Tour returns an object instead of a simple dict
- Tabs and Pages - make the Tour navigate between tabs and pages (maybe with an intermediate Python actions ?)
-
Tour.reset()- a utility function to clear the one-time-tour flag fromlocalStorage - Step grouping - define multiple named tours and selectively launch them
- Theme support - CSS variable overrides to match Streamlit's light/dark mode
- Driver.js parameters - implement all the other Driver.js options
Metadata
Release files for streamlit-tour 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| streamlit_tour-1.1.0.tar.gz | 32.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlit_tour-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.4 kB
Release files / streamlit_tour-1.1.0.tar.gz
| Download URL | streamlit_tour-1.1.0.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
034712c8e7c13743c7af4eb2163ecfa8c41ffd969e9def1ec992bef3d91b62d9
|
|
BLAKE2b-256 checksum How to use checksums |
f158a5b31838ff8ac81ba8220c4abc057b9d9b0cfc1e78dbd4a6904cf6bba22a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / streamlit_tour-1.1.0-py3-none-any.whl
| Download URL | streamlit_tour-1.1.0-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
595a3f463dfe6779031b5540910928462a4c2bd0c8554bb210cfe9a9dcd9ff97
|
|
BLAKE2b-256 checksum How to use checksums |
8fa400dd225f3e55587ecf02e8bcf575e164e94bdfb4e9e7042a9fccb7a5461e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for streamlit-tour 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.