Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| st.title('Links & Query Strings') | |
| with st.container(): | |
| st.subheader('Current page info:') | |
| st.write(st.query_params) | |
| st.link_button("Link to main page", "/") | |
| st.link_button("Link to main page with query params", "/?key=val") | |
| st.link_button("Link to this page", "page1") | |
| st.link_button("Link to this page with query params", "page1?key=val") | |
| def from_dict(): | |
| st.query_params.from_dict({"key123": "val123"}) | |
| with st.container(): | |
| st.button("from dict", on_click=from_dict) | |