Skip to content

Allow link in st.logo to link to one of the app pages #13155

@lukasmasuch

Description

@lukasmasuch

Checklist

  • I have searched the existing issues for similar feature requests.
  • I added a descriptive title and summary to this issue.

Summary

Make st.logo always link to the home page (in MPA apps) if link is not provided or allow link in st.logo to do an internal redirect to one of the app pages, e.g.:

st.logo(..., link: st.Page | Path | str)

If the provided (relative) str url is matching with one of the pages, we can also just do an internal redirect instead of doing a full page reload. This is more optimal for iframed setups and it keeps the app session alive instead of doing a full page reload. The parameter should work similar to how to the page parameter in st.page_link and st.switch_page.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.logoRelated to `st.logo` commandgood first issueGood for newcomers to the codebasetype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions