Highlights
Introducing top navigation! Use st.navigationwithposition="top"to create a navigation menu across the top of your app.
You can detect if the viewer is in light mode or dark mode at runtime with st.context.theme.
Notable Changes
Streamlit no longer restricts the nesting of columns, expanders, popovers, and chat message containers, but beware of bad design! Always be mindful of different screen sizes and orientations, and donāt overuse nested layouts.- āļø You can set the width of most Streamlit elements.
st.formhas a new parameter to configure itsheight.
st.columnssupportsgap=Nonefor no gap between columns.
Font face declarations in config.tomlsupport weight and unicode ranges (#11248, #11163, #11247).
Font face declarations are supported in the window variable (#11628, #11568).
Streamlit searches for secrets and configuration options relative to the entrypoint file in addition to the working directory and user root (#10173, #8195).
A new configuration option, theme.dataframeBorderColor, lets you set the border color for dataframes and tables separately from other border colors (#11475).
A new configuration option, theme.buttonRadius, lets you set the radius of buttons separately from other elements (#11464).
A new configuration option, theme.codeFontSize, lets you set the size of code inst.code,st.json, andst.help(#11508).
You can configure a list of allowed origins when CORS protection is enabled (#11377).
st.set_page_configcan be called multiple times in a single script run (#11286, #4483, #2216, #9797, #9038).
st.pydeck_chartandst.mapnow use Carto by default to provide map tiles (#11231).
You can configure Streamlit to watch additional directories for changes with the new configuration option, server.folderWatchList(#9656, #9655). Thanks, akramsystems!
Other Changes
Exception messages include a copy button to conveniently copy the message to your clipboard (#11250, #11083). Thanks, snakeM!
Streamlit apps can be served from port 3000 (#11525, #8149).
Markdown dependencies were upgraded for improved performance (#11553, #11550).- āļø The sidebar is narrower by default and consistently handles the scrollbar spacing (#11412).
We gave Streamlit hello a couple small tweaks (#11442).
Base URL window variables are consistently namespaced in __streamlit(#11481).
Streamlit apps now serve a manifest.jsonfile (#11462).
st.dataframeshows row selection boxes always instead of just on hover (#11411, #11410).
ListColumnandLinkColumncan inherit coloring frompandasStyler(#11612, #8254).
NumberColumnandProgressColumnsupport a Japanese yen number format (#11588). Thanks, alexmalins!
st.page_linkcan inherit an icon when passed aStreamlitPage(#10694, #9743). Thanks, abokey1!
A buttonās placement in the sidebar or main body of an app is included in its widget identity (#10881, #10598). Thanks, joaooliveira-11!
Built-in Streamlit fonts now use variable font files (#11646, #11600, #11534).
Bug fix: Streamlit Markdown correctly formats task lists and block quotes (#11237).
Bug fix: Horizontal scroll bars are sized correctly in Safari (#11625).
Bug fix: Unnecessary media caching was reduced to improve efficiency and avoid video player crashes (#11635, #9688).
Bug fix: st.textuses thebreak-wordCSS property to wrap long lines without whitespace (#10969, #10824). Thanks, matilde2004!
Bug fix: Material icons display correctly in st.markdownwhenunsafe_allow_html=True(#11633, #9945).
Bug fix: Multi-index column names preserve brackets (#11617, #10415).
Bug fix: Various CSS tweaks (#11631, #11632, #11630, #11611, #11577, #9085, #8671, #11576, #11569).
Bug fix: st.dataframeclears filter options when applying sort to prevent incorrect highlights (#11587, #11575).
Bug fix: Altair charts have the correct width and donāt overflow with long titles (#11585, #9984).
Bug fix: st.toastmessages appear abovest.dialogcontainers (#11578, #10383).
Bug fix: Streamlit apps correctly scroll to anchor links (#11552, #11551).
Bug fix: st.contextdoes not lose state in an app being edited (#11506, #11330).
Bug fix: st.codepreserves leading white space (#10065, #6302). Thanks, XuehaiPan!
Bug fix: st.date_inputshows the correct hover effect when using date ranges (#11223, #10929). Thanks, Bernardo1008!
Bug fix: Dataframes using pandasStylercorrectly displayEnumvalues (#11049, #10637). Thanks, BigBird404!
Bug fix: st.contextdoes not lose state whenst.switch_pageis called (#11521, #11507).
Bug fix: File watcher correctly handles custom metaclasses (#10388, #10992). Thanks, HomenShum!
Bug fix: st.mapuses a private Mapbox token when configured (#11511, #11399).
Bug fix: vega-interpreterwas updated to prevent unintentional blank axes (#11514, #5733).
Bug fix: Truncated values in NumberColumnare rounded correctly (#11520, #11519).
Bug fix: Highlighted in text in Markdown has the correct padding on wrapped lines (#11530).
Bug fix: For a Plotly chart, reset axes works correctly after using fullscreen (#11498, #11327).
Bug fix: Altair chart are not cropped on the left on first load (#10939, #9339). Thanks, goncalossmartins!
Bug fix: Chart columns correctly show negative values (#11048, #10411). Thanks, tiagorb1!
Bug fix: Streamlit doesnāt crash when editing indices in st.data_editor(#11448, #11434).
Bug fix: Color and style is preserved in charts when using .add_rows()(#11414, #11312).
Bug fix: Tornado 6.5.0 is excluded to prevent file uploading errors related to unicode filenames (#11440, #11396, #11436).
Bug fix: Selected rows are cleared when a column in st.dataframeis sorted (#11363, #11345).
Bug fix: Streamlit shows a clearer message when it canāt connect to the server and automatically dismisses the message if a connection is successful (#11366).
Bug fix: Localized number and date formats correctly interpret locales with commas (#11297, #11291).
Bug fix: Streamlit cleans up the forward message cache to prevent WebSocket message errors (#11302, #11299, #11300).
Bug fix: st.latexscrolls horizontally when its content is wider than the app (#10071, #4304).
Bug fix: st.multiselecthas a more stable sort when filtering options (#11309, #11218).
Bug fix: st.multiselectoptions are case sensitive and donāt overlap in the drop down menu (#11307, #11217, #11306, #11215).
Bug fix: Streamlit logs an error if the cookie returned by st.loginis too large (#11290, #11168).
Bug fix: Displaying elements within a fragmentās callback logs a clear warning that itās not supported (#10942, #10475). Thanks, Zane-dev16!
Bug fix: st.file_uploaderis case insensitive when validating allowed file extensions (#11261, #11259).
Bug fix: Page runs end correctly to prevent invalid widget states (#11258, #11202).
Bug fix: Error messages correctly refer to st.userinstead ofst.experimental_user(#11198).
Bug fix: The missing label warning for widgets includes a stack trace (#11187, #8908).
Bug fix: st.data_editorreturns the correct result when some rows are deleted and others are added (#11183, #11180).