streamlit
1# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import streamlit as st
16
17sidebar_markdown = """# I am a header
18
19## I am a subheader
20
21### I am a subsubheader
22
23I am some body text
24
25[I am a link](https://google.com)
26
27Foo `bar` baz"""
28
29with st.sidebar:
30st.caption(sidebar_markdown)
31
32st.caption("This is a caption!")
33st.caption("This is a *caption* that contains **markdown inside it**!")
34st.caption("This is a caption that contains <div>html</div> inside it!")
35st.caption(
36"This is a caption that contains <div>html</div> inside it!", unsafe_allow_html=True
37)
38st.caption(
39"""This is a caption that contains a bunch of interesting markdown:
40
41# heading 1
42
43## heading 2
44
45### heading 3
46
47#### heading 4
48
49##### heading 5
50
51###### heading 6
52
53* unordered list item 1
54* unordered list item 2
55* unordered list item 3
56
571. ordered list item 1
581. ordered list item 2
591. ordered list item 3
60"""
61)
62