question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to change the default width of sidebar

See original GitHub issue

Problem

I would like to be able to change the width of the sidebar. In the previous version, the method mentioned in this https://github.com/streamlit/streamlit/issues/2058#issuecomment-816989601 worked well to solve my problem.

However, after the update, sidebar became draggable, but the above method no longer works. I also did not find a parameter where I can change the default width. Please forgive me if I am missing something

Solution

MVP: Provide a parameter in st.set_page_config to control the default sidebar width.


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:21
  • Comments:7

github_iconTop GitHub Comments

4reactions
marduk2commented, Nov 7, 2022

+1 to this request @jrieke.

Setting a fixed sidebar width is quite important. If a user makes sidebar too narrow, everything in it starts “word-wrapping”. This happening to 1 widget or element in sidebar is bearable, but with a few widgets or elements in the sidebar (a very common situation in Streamlit apps), it gets ugly fast.

For example, sometimes we want this sidebar width to match the width needed to display a header, subheader, text, or button with a “longer than usual label” in a single line (instead of “word-wrapping” and continuing on a second line).

2reactions
matkozakcommented, Nov 3, 2022

Same here. I jumped into 1.14 from 1.11. I do not particularly care for the manual resizing, but the sidebar is now too narrow for the content I had there before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can you change the default width of semantic-ui sidebars?
One way to do it is to just add a new class: .ui.custom.sidebar { width: 315px !important; margin-left: -315px !important; } .ui.active.custom.sidebar ......
Read more >
Sidebar Widths - GeneratePress documentation
You can adjust the width of your sidebars in Customize > Layout > Sidebars. The widths are percentage based, and the width of...
Read more >
Changing the Default Sidebar Width in Finder
3. Hit "Run," save it locally, and your Finder sidebars have a new default width!
Read more >
How can I make the sidebar-width the default? - Ask Ubuntu
1. GUI ... Then navigate to "org" > "gnome" > "nautilus" > "window-state", and click on "sidebar-width". subsequently, either set a new value...
Read more >
Change width of sidebar - Using Streamlit
Hi @lnros . There is currently no official way to set the sidebar width, but if you search the forums you'll find some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found