Highlights
-
Introducing
MultiselectColumn
to configure colorful, editable lists in your dataframes. -
Announcing color palette configuration options to set the exact shade of red, orange, yellow, green, blue, violet, and grey to use in Markdown, status elements, sparklines,
st.metric
, andst.badge
. -
st.bar_chart
has a newsort
parameter for conveniently sorting your bars.
Notable Changes
-
To prevent widgets from resetting when you change a parameter, widgets are transitioning to an identity based only on their keys (if provided). The following widgets use only their key for their identity:
-
st.button
-
st.download_button
-
st.checkbox
-
st.toggle
-
st.text_area
-
st.text_input
-
st.number_input
-
st.time_input
-
st.date_input
-
st.selectbox
-
st.multiselect
-
Custom components
-
-
You can configure the color of chart columns.
-
st.metric
supportsdecimal.Decimal
types (#12377, #12308). Thanks, aebrahim! -
You can specify the sample rate for
st.audio_input
, and the default sample rate has been reduced to 16000 Hz. -
For clarity, in
st.plotly_chart
,**kwargs
is deprecated and replaced byconfig
(#12291, #12280). Thanks, zyfy29! -
st.line_chart
andst.graphviz_chart
havewidth
parameters to use with flex containers. -
You can configure
st.table
borders to show all, only horizontal, or no lines. -
You can specify a default tab in
st.tabs
. -
To use hosted fonts from providers like Google and Adobe, you can declare externally hosted fonts with a URL to their CSS file in
theme.font
,theme.headingFont
, andtheme.codeFont
.
Other Changes
-
To prevent browser defaults from invalidating caches too soon, cache headers include the
max-age
andimmutable
directives (#12420). -
Bug fix: To correct a sequential navigation regression for
st.number_input
, some internal refactoring was reverted (#12547, #12526). -
Bug fix: Custom components respect zero-size dimensions (#12479, #12454).
-
Bug fix: Images respect center alignment in containers (#12495, #12435).
-
Bug fix: If you use an empty string as a section label in top navigation, those pages will display individually before the collapsible sections (#12247, #12243).
-
Bug fix: To fix a performance regression, dataframes use
.iat[]
instead of.iloc[]
internally (#12422, #10952). -
Bug fix:
st.data_editor
accepts Shift+Enter for multiline entry in a cell (#12401, #12386). -
Bug fix: To make
st.pdf
more compatible on Windows, MIME types were updated (#12399, #12387). Thanks, geoextra! -
Bug fix: To prevent long-word overflow, words are forced to break if they exceed their container’s width (#12370, #12366).
-
Bug fix: Hiding all dataframe columns won’t raise a TypeError (#12361, #12227).
-
Bug fix:
st.logo
doesn’t dislocate the sidebar collapse button (#12329, #12326). -
Bug fix: When using
accept_new_options=True
withst.multiselect
, mobile users can access their keyboards (#12330). -
Bug fix:
st.components.v1.html
ignores fractional pixels inwidth
(#12354, #12340). -
Bug fix:
st.number_input
correctly accepts keyed entries (#12351, #12349). -
Bug fix: Markdown images maintain their aspect ratio when constrained (#12343).
-
Bug fix:
st.date_input
is inclusive of min and max values (#12295, #12293). -
Bug fix: Maintain image proportions in fullscreen mode for all width settings (#12235).
-
Bug fix: Markdown code blocks don’t overflow when used in labels (#12175, #12149).