ποΈΒ Β Color ya Headers
Submitted by Johannes Rieke / Tyler Richards
Summary
This function makes headers much prettier in Streamlit.
Note that this now accessible in native Streamlit in st.header
with parameter divider
!
Functions
colored_header
Shows a header with a colored underline and an optional description.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label |
str
|
Header label. Defaults to "Nice title". |
'Nice title'
|
description |
str
|
Description shown under the header. Defaults to "Cool description". |
'Cool description'
|
color_name |
_SUPPORTED_COLORS
|
Color of the underline. Defaults to "red-70". Supported colors are "light-blue-70", "orange-70", "blue-green-70", "blue-70", "violet-70", "red-70", "green-70", "yellow-80". |
'red-70'
|
Source code in src/streamlit_extras/colored_header/__init__.py
Import:
- You should add this to the top of your .py file
Examples
example
def example():
colored_header(
label="My New Pretty Colored Header",
description="This is a description",
color_name="violet-70",
)