When generating a large number of tabs with st.tabs, unmanageable tabs may occur

Summary

When generating a large number of tabs with st.tabs, unmanageable tabs may occur.
I would like to know if there is any way to avoid this issue without reducing the number of characters in the tabs.

Steps to reproduce

Code snippet:

import streamlit as st

tabs = st.tabs([f"Tab of {i}" for i in range(50)])

Expected behavior:
I want to access hidden tabs, like scroll.

Actual behavior:

hidden tabs.
tabs

Debug info

  • Streamlit version: 1.23.1
  • Python version: 3.10.5

You can scroll through the tabs.

  1. If you have horizontal scroll, that works while hovering over the tabs.
  2. Otherwise, hold shift while using scroll and hovering over the tabs.
  3. Otherwise you can use the arrow keys to navigate through the tabs after selecting one.

There is also a GitHub feature request to vote on if you’d like, mentioned in this other thread:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.