Skip to content

Commit 3a33452

Browse files
Release 1.40.0 (#1180)
* Only deprecate the first mentioned parameter in a notice. * Add API pages * Update streamlit.json * API reference cards * Audio input GA * Update streamlit.json * Update streamlit.json * Update streamlit.json * st.text example typo * Update streamlit.json * Update navigation example for style * Release notes * Update streamlit.json * What's new * Cheat sheet * Bump app versions
1 parent 08877cc commit 3a33452

File tree

31 files changed

+10847
-170
lines changed

31 files changed

+10847
-170
lines changed

content/develop/api-reference/_index.md

+40-14
Original file line numberDiff line numberDiff line change
@@ -779,19 +779,6 @@ Display a download button widget.
779779
st.download_button("Download file", file)
780780
```
781781

782-
</RefCard>
783-
<RefCard href="/develop/api-reference/widgets/st.feedback">
784-
785-
<Image pure alt="screenshot" src="/images/api/feedback.jpg" />
786-
787-
<h4>Feedback</h4>
788-
789-
Display a rating or sentiment button group.
790-
791-
```python
792-
st.feedback("stars")
793-
```
794-
795782
</RefCard>
796783
<RefCard href="/develop/api-reference/execution-flow/st.form_submit_button">
797784

@@ -858,6 +845,19 @@ Display a color picker widget.
858845
color = st.color_picker("Pick a color")
859846
```
860847

848+
</RefCard>
849+
<RefCard href="/develop/api-reference/widgets/st.feedback">
850+
851+
<Image pure alt="screenshot" src="/images/api/feedback.jpg" />
852+
853+
<h4>Feedback</h4>
854+
855+
Display a rating or sentiment button group.
856+
857+
```python
858+
st.feedback("stars")
859+
```
860+
861861
</RefCard>
862862
<RefCard href="/develop/api-reference/widgets/st.multiselect">
863863

@@ -871,6 +871,19 @@ Display a multiselect widget. The multiselect widget starts as empty.
871871
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
872872
```
873873

874+
</RefCard>
875+
<RefCard href="/develop/api-reference/widgets/st.pills">
876+
877+
<Image pure alt="screenshot" src="/images/api/pills.jpg" />
878+
879+
<h4>Pills</h4>
880+
881+
Display a pill-button selection widget.
882+
883+
```python
884+
st.pills("Tags", ["Sports", "AI", "Politics"])
885+
```
886+
874887
</RefCard>
875888
<RefCard href="/develop/api-reference/widgets/st.radio">
876889

@@ -884,6 +897,19 @@ Display a radio button widget.
884897
choice = st.radio("Pick one", ["cats", "dogs"])
885898
```
886899

900+
</RefCard>
901+
<RefCard href="/develop/api-reference/widgets/st.segmented_control">
902+
903+
<Image pure alt="screenshot" src="/images/api/segmented_control.jpg" />
904+
905+
<h4>Segmented control</h4>
906+
907+
Display a segmented-button selection widget.
908+
909+
```python
910+
st.segmented_control("Filter", ["Open", "Closed", "All"])
911+
```
912+
887913
</RefCard>
888914
<RefCard href="/develop/api-reference/widgets/st.selectbox">
889915

@@ -1026,7 +1052,7 @@ name = st.text_input("First name")
10261052
Display a widget that allows users to record with their microphone.
10271053

10281054
```python
1029-
speech = st.experimental_audio_input("Record a voice message")
1055+
speech = st.audio_input("Record a voice message")
10301056
```
10311057

10321058
</RefCard>

content/develop/api-reference/text/text.md

-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ description: st.text writes fixed-width and preformatted text.
55
---
66

77
<Autofunction function="streamlit.text" />
8-
9-
<Image src="/images/api/st.text.png" clean />

content/develop/api-reference/widgets/_index.md

+65-40
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,6 @@ st.download_button("Download file", file)
3838

3939
</RefCard>
4040

41-
<RefCard href="/develop/api-reference/widgets/st.feedback">
42-
43-
<Image pure alt="screenshot" src="/images/api/feedback.jpg" />
44-
45-
<h4>Feedback</h4>
46-
47-
Display a rating or sentiment button group.
48-
49-
```python
50-
st.feedback("stars")
51-
```
52-
53-
</RefCard>
54-
5541
<RefCard href="/develop/api-reference/execution-flow/st.form_submit_button">
5642

5743
<Image pure alt="screenshot" src="/images/api/form_submit_button.svg" />
@@ -114,55 +100,81 @@ selected = st.checkbox("I agree")
114100
```
115101

116102
</RefCard>
117-
<RefCard href="/develop/api-reference/widgets/st.toggle">
103+
<RefCard href="/develop/api-reference/widgets/st.color_picker">
118104

119-
<Image pure alt="screenshot" src="/images/api/toggle.jpg" />
105+
<Image pure alt="screenshot" src="/images/api/color_picker.jpg" />
120106

121-
<h4>Toggle</h4>
107+
<h4>Color picker</h4>
122108

123-
Display a toggle widget.
109+
Display a color picker widget.
124110

125111
```python
126-
activated = st.toggle("Activate")
112+
color = st.color_picker("Pick a color")
127113
```
128114

129115
</RefCard>
130-
<RefCard href="/develop/api-reference/widgets/st.radio">
116+
<RefCard href="/develop/api-reference/widgets/st.feedback">
131117

132-
<Image pure alt="screenshot" src="/images/api/radio.jpg" />
118+
<Image pure alt="screenshot" src="/images/api/feedback.jpg" />
133119

134-
<h4>Radio</h4>
120+
<h4>Feedback</h4>
135121

136-
Display a radio button widget.
122+
Display a rating or sentiment button group.
137123

138124
```python
139-
choice = st.radio("Pick one", ["cats", "dogs"])
125+
st.feedback("stars")
140126
```
141127

142128
</RefCard>
143-
<RefCard href="/develop/api-reference/widgets/st.selectbox">
129+
<RefCard href="/develop/api-reference/widgets/st.multiselect">
144130

145-
<Image pure alt="screenshot" src="/images/api/selectbox.jpg" />
131+
<Image pure alt="screenshot" src="/images/api/multiselect.jpg" />
146132

147-
<h4>Selectbox</h4>
133+
<h4>Multiselect</h4>
148134

149-
Display a select widget.
135+
Display a multiselect widget. The multiselect widget starts as empty.
150136

151137
```python
152-
choice = st.selectbox("Pick one", ["cats", "dogs"])
138+
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
153139
```
154140

155141
</RefCard>
156-
<RefCard href="/develop/api-reference/widgets/st.multiselect">
142+
<RefCard href="/develop/api-reference/widgets/st.pills">
157143

158-
<Image pure alt="screenshot" src="/images/api/multiselect.jpg" />
144+
<Image pure alt="screenshot" src="/images/api/pills.jpg" />
159145

160-
<h4>Multiselect</h4>
146+
<h4>Pills</h4>
161147

162-
Display a multiselect widget. The multiselect widget starts as empty.
148+
Display a pill-button selection widget.
163149

164150
```python
165-
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
151+
st.pills("Tags", ["Sports", "AI", "Politics"])
152+
```
153+
154+
</RefCard>
155+
<RefCard href="/develop/api-reference/widgets/st.radio">
156+
157+
<Image pure alt="screenshot" src="/images/api/radio.jpg" />
158+
159+
<h4>Radio</h4>
160+
161+
Display a radio button widget.
162+
163+
```python
164+
choice = st.radio("Pick one", ["cats", "dogs"])
165+
```
166+
167+
</RefCard>
168+
<RefCard href="/develop/api-reference/widgets/st.segmented_control">
169+
170+
<Image pure alt="screenshot" src="/images/api/segmented_control.jpg" />
171+
172+
<h4>Segmented control</h4>
173+
174+
Display a segmented-button selection widget.
175+
176+
```python
177+
st.segmented_control("Filter", ["Open", "Closed", "All"])
166178
```
167179

168180
</RefCard>
@@ -179,16 +191,29 @@ size = st.select_slider("Pick a size", ["S", "M", "L"])
179191
```
180192

181193
</RefCard>
182-
<RefCard href="/develop/api-reference/widgets/st.color_picker">
194+
<RefCard href="/develop/api-reference/widgets/st.selectbox">
183195

184-
<Image pure alt="screenshot" src="/images/api/color_picker.jpg" />
196+
<Image pure alt="screenshot" src="/images/api/selectbox.jpg" />
185197

186-
<h4>Color picker</h4>
198+
<h4>Selectbox</h4>
187199

188-
Display a color picker widget.
200+
Display a select widget.
189201

190202
```python
191-
color = st.color_picker("Pick a color")
203+
choice = st.selectbox("Pick one", ["cats", "dogs"])
204+
```
205+
206+
</RefCard>
207+
<RefCard href="/develop/api-reference/widgets/st.toggle">
208+
209+
<Image pure alt="screenshot" src="/images/api/toggle.jpg" />
210+
211+
<h4>Toggle</h4>
212+
213+
Display a toggle widget.
214+
215+
```python
216+
activated = st.toggle("Activate")
192217
```
193218

194219
</RefCard>
@@ -320,7 +345,7 @@ if prompt:
320345
Display a widget that allows users to record with their microphone.
321346

322347
```python
323-
speech = st.experimental_audio_input("Record a voice message")
348+
speech = st.audio_input("Record a voice message")
324349
```
325350

326351
</RefCard>

content/develop/api-reference/widgets/audio_input.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ slug: /develop/api-reference/widgets/st.audio_input
44
description: st.audio_input displays a widget to upload audio from a microphone
55
---
66

7-
<Autofunction function="streamlit.experimental_audio_input" />
7+
<Autofunction function="streamlit.audio_input" oldName="streamlit.experimental_audio_input" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: st.pills
3+
slug: /develop/api-reference/widgets/st.pills
4+
description: st.pills displays a select widget where options display as pill buttons.
5+
---
6+
7+
<Autofunction function="streamlit.pills" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: st.segmented_control
3+
slug: /develop/api-reference/widgets/st.segmented_control
4+
description: st.segmented_control displays a select widget where options display in a segmented button.
5+
---
6+
7+
<Autofunction function="streamlit.segmented_control" />

content/develop/quick-references/api-cheat-sheet.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ slug: /develop/quick-reference/cheat-sheet
55

66
# Streamlit API cheat sheet
77

8-
This is a summary of the docs for the latest version of Streamlit, [v1.39.0](https://pypi.org/project/streamlit/1.39.0/).
8+
This is a summary of the docs for the latest version of Streamlit, [v1.40.0](https://pypi.org/project/streamlit/1.40.0/).
99

1010
<Masonry>
1111

@@ -64,7 +64,7 @@ streamlit --version
6464
```python
6565
# Magic commands implicitly
6666
# call st.write().
67-
"_This_ is some **Markdown***"
67+
"_This_ is some **Markdown**"
6868
my_variable
6969
"dataframe:", my_data_frame
7070

@@ -78,12 +78,12 @@ my_variable
7878

7979
```python
8080
st.write("Most objects") # df, err, func, keras!
81-
st.write(["st", "is <", 3]) # see *
81+
st.write(["st", "is <", 3])
8282
st.write_stream(my_generator)
8383
st.write_stream(my_llm_stream)
8484

8585
st.text("Fixed width text")
86-
st.markdown("_Markdown_") # see *
86+
st.markdown("_Markdown_")
8787
st.latex(r""" e^{i\pi} + 1 = 0 """)
8888
st.title("My title")
8989
st.header("My header")
@@ -284,13 +284,15 @@ fragment_function()
284284
```python
285285
st.button("Click me")
286286
st.download_button("Download file", data)
287-
st.feedback("thumbs")
288287
st.link_button("Go to gallery", url)
289288
st.page_link("app.py", label="Home")
290289
st.data_editor("Edit data", data)
291290
st.checkbox("I agree")
292-
st.toggle("Enable")
291+
st.feedback("thumbs")
292+
st.pills("Tags", ["Sports", "Politics"])
293293
st.radio("Pick one", ["cats", "dogs"])
294+
st.segmented_control("Filter", ["Open", "Closed"])
295+
st.toggle("Enable")
294296
st.selectbox("Pick one", ["cats", "dogs"])
295297
st.multiselect("Buy", ["milk", "apples", "potatoes"])
296298
st.slider("Pick a number", 0, 100)
@@ -301,7 +303,7 @@ st.text_area("Text to translate")
301303
st.date_input("Your birthday")
302304
st.time_input("Meeting time")
303305
st.file_uploader("Upload a CSV")
304-
st.experimental_audio_input("Record a voice message")
306+
st.audio_input("Record a voice message")
305307
st.camera_input("Take a picture")
306308
st.color_picker("Pick a color")
307309

content/develop/quick-references/release-notes/2024.md

+38
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,44 @@ keywords: changelog, release notes, version history
99

1010
This page contains release notes for Streamlit versions released in 2024. For the latest version of Streamlit, see [Release notes](/develop/quick-reference/release-notes).
1111

12+
## **Version 1.40.0**
13+
14+
_Release date: November 6, 2024_
15+
16+
**Highlights**
17+
18+
- 💊 Introducing [`st.pills`](/develop/api-reference/widgets/st.pills) to create a single- or multi-select group of pill-buttons.
19+
- 🎛️ Introducing [`st.segmented_control`](/develop/api-reference/widgets/st.segmented_control) to create a segmented button or button group.
20+
- 🎤 Announcing the general availability of [`st.audio_input`](), a widget to let users record sound with their microphones.
21+
22+
**Notable Changes**
23+
24+
- ➡️ Markdown renders a limited set of typographical symbols (arrows and comparators).
25+
- <img src="/logo.svg" style={{ display: "inline-block", width: "1em" }} /> You can use `:streamlit:` to render the Streamlit logo in [Markdown](/develop/api-reference/text/st.markdown).
26+
- 🐍 [`st.text`](/develop/api-reference/text/st.text) wraps text and no longer uses monospace font.
27+
- 🪣 You can set `use_container_width` for [`st.image`](/develop/api-reference/media/st.image). `use_column_width` is deprecated.
28+
- 📅 [`st.date_input`](/develop/api-reference/widgets/st.date_input) infers the first day of the week from the user’s locale ([#9706](https://github.com/streamlit/streamlit/pull/9706), [#5215](https://github.com/streamlit/streamlit/issues/5215)).
29+
30+
**Other Changes**
31+
32+
- 🎶 Streamlit’s CLI tool accepts array values for configuration options ([#9577](https://github.com/streamlit/streamlit/pull/9577)).
33+
- ⛓️ Static file serving supports symlinks ([#9147](https://github.com/streamlit/streamlit/pull/9147), [#9146](https://github.com/streamlit/streamlit/issues/9146)). Thanks, [link89](https://github.com/link89)!
34+
- 🚀 Streamlit provides helpful links for deployment when an app is running locally ([#9681](https://github.com/streamlit/streamlit/pull/9681)).
35+
- ↕️ The fullscreen button for charts matches with the dataframe toolbar ([#9721](https://github.com/streamlit/streamlit/pull/9721)).
36+
- 🏃 The running-man icon has a brief delay before rendering to avoid an unnecessary flicker for fast running apps ([#9732](https://github.com/streamlit/streamlit/pull/9732)).
37+
- 🖇️ The `ComponentRequestHandler` allows symlinks ([#9588](https://github.com/streamlit/streamlit/pull/9588)).
38+
- 👆 Streamlit works with `pillow` version 11 ([#9742](https://github.com/streamlit/streamlit/pull/9742)). Thanks, [hauntsaninja](https://github.com/hauntsaninja)!
39+
- 🗺️ Deck.gl was upgraded to version 9.0.33 ([#9636](https://github.com/streamlit/streamlit/pull/9636)).
40+
- 🦠 Bug fix: `st.latex` stays center-aligned when using the `help` keyword argument ([#9698](https://github.com/streamlit/streamlit/pull/9698), [#9682](https://github.com/streamlit/streamlit/issues/9682)). Thanks, [emmagarr](https://github.com/emmagarr)!
41+
- 🪰 Bug fix: Apps correctly access local storage on Android ([#9744](https://github.com/streamlit/streamlit/pull/9744), [#9740](https://github.com/streamlit/streamlit/issues/9740)).
42+
- 🕷️ Bug fix: Cached class methods can be cleared ([#9642](https://github.com/streamlit/streamlit/pull/9642), [#9633](https://github.com/streamlit/streamlit/issues/9633)).
43+
- 🐞 Bug fix: Streamlit clears fragment auto-reruns when a user changes pages. This prevents an invalid index ([#9617](https://github.com/streamlit/streamlit/pull/9617)).
44+
- 🐝 Bug fix: `st.page_link` margins are correct ([#9625](https://github.com/streamlit/streamlit/pull/9625)).
45+
- 🐜 Bug fix: Form widgets show submission instructions when in focus ([#9576](https://github.com/streamlit/streamlit/pull/9576), [#7079](https://github.com/streamlit/streamlit/issues/7079)).
46+
- 🪲 Bug fix: `st.navigation` correctly reconciles `client.showSidebarNavigation` ([#9589](https://github.com/streamlit/streamlit/pull/9589), [#9581](https://github.com/streamlit/streamlit/issues/9581)).
47+
- 🐛 Bug fix: `st.text_area` requires a minimum height of 68px which fits two lines ([#9561](https://github.com/streamlit/streamlit/pull/9561), [#9217](https://github.com/streamlit/streamlit/issues/9217)).
48+
- 💅 Bug fix: Various styling fixes ([#9529](https://github.com/streamlit/streamlit/pull/9529), [#8131](https://github.com/streamlit/streamlit/issues/8131), [#9555](https://github.com/streamlit/streamlit/pull/9555), [#9496](https://github.com/streamlit/streamlit/issues/9496), [#9554](https://github.com/streamlit/streamlit/pull/9554), [#9349](https://github.com/streamlit/streamlit/issues/9349), [#7739](https://github.com/streamlit/streamlit/issues/7739)).
49+
1250
## **Version 1.39.0**
1351

1452
_Release date: October 1, 2024_

0 commit comments

Comments
 (0)