streamlit / streamlit

Streamlit — A faster way to build and share data apps.
https://streamlit.io
Apache License 2.0
38.3k stars 3.33k forks source link

Add a stepper widget #10748

Open lukasmasuch opened 1 week ago

lukasmasuch commented 1 week ago

Checklist

Summary

Add an element that allows to guide a user through a series of discrete steps. This is a common widget also sometimes referred to as progress steps, stepper, progress indicator, wizard component...

Image

Why?

Sometimes, people want to do apps where the user needs to go through multiple steps. This is not well supported in Streamlit today.

How?

selected_step = st.stepper(["Ready", "Get Set", "Go"])
if selected_step == "Ready":
    # Do stuff

We probably also want to support this in a horizontal & vertical direction and allow a way to programmatically set the selected step (e.g. via session state). Another potential feature is to set icons for every step.

Additional Context

github-actions[bot] commented 1 week ago

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits