what is it
a marquee component for streamlit
how to use
first, install via pip online
pip install streamlit-marquee
or download the wheel file and install offline
pip install {{the downloaded wheel file path in your pc}}
or just download the source-code.
then, there are two demos below.
demo 1 (recommend)
from streamlit_marquee import streamlit_marquee
streamlit_marquee(**{
'background': "#ff0000",
'font-size': '12px',
"color": "#ffffff",
'content': 'here is custom marquee component~',
'width': '600px',
'lineHeight': "35px",
'animationDuration': '5s',
})
demo 2
from streamlit_marquee import streamlit_marquee
streamlit_marquee(content='here is custom marquee component~')
how it realizes
since the html tag <marquee>
has been declared as deprecated.
as an alternative, use css animation to realize.
supported attributes
- background
- fontSize
- color
- content
- width
- lineHeight
- animationDuration
you can also download the source code and change to support more attributes such as transition-timing-function.
any question, please open issues.