Skip to content

st.expander cuts off sliders #2247

@tybirk-mindway

Description

@tybirk-mindway

Summary

Expander in sidebar cuts off sliders and potentially other stuff

Steps to reproduce

Run the following code

import streamlit as st

sidebar_expander = st.sidebar.beta_expander("Bad sliders underneath!")
with sidebar_expander:
    st.slider("Bad layout slider 1", 0, 100, value=0)
    st.slider("Bad layout slider 2", 0, 100, value=(0,100))

st.sidebar.slider("Good layout slider")

Expected behavior:

Sliders appear nicely under the expander

Actual behavior:

Sliders ends are cut off under the expander (see picture)

image

Is this a regression?

No

Debug info

  • Streamlit version: 0.69.1
  • Python version: 3.8.2
  • Using PipEnv
  • OS version: Windows 10
  • Browser version: Firefox and Chrome, recent versions

Additional information

May also happen in containers outside of sidebar? Have not checked it though..

Metadata

Metadata

Assignees

Labels

area:layoutRelated to layout and positioningtype:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions