Skip to content

Commit 1cc9257

Browse files
committed
Add disable_scroll example
1 parent ec310b0 commit 1cc9257

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
anchor_labels=None, # Use anchor_ids as labels
1616
anchor_icons=anchor_icons)
1717

18-
# 2. horizontal menu
18+
# 2. horizontal menu with scroll disabled
1919
st.subheader("Example 2")
2020
scroll_navbar(
2121
anchor_ids,
2222
key = "navbar2",
2323
anchor_icons=anchor_icons,
24-
orientation="horizontal")
24+
orientation="horizontal",
25+
disable_scroll=True)
2526

2627
# 3. Custom anchor labels with no icons
2728
st.subheader("Example 3")
@@ -54,8 +55,7 @@
5455
"navigationBarBase": {
5556
"backgroundColor": "#f8f9fa", # Change the navigation bar background color
5657
}
57-
}
58-
)
58+
})
5959

6060
# 5. Force anchor
6161
st.subheader("Example 5")

0 commit comments

Comments
 (0)