Create and add reveal.js HTML presentations to your streamlit app!
[ DEMO ] [ PLAYGROUND ]
Install streamlit-reveal-slides with pip:
pip install streamlit-reveal-slides
Alternatively, you can download the source from the download page and after unzipping, install with:
python setup.py install
(make sure you are in the same directory as 'setup.py' in the unzipped folder).
To add a reveal.js presentation to your Streamlit (python) app, import reveal_slides
and then call the slides
function with the presentation contents in markdown format:
import streamlit as st
import reveal_slides as rs
response_dict = rs.slides(content_markdown)
The slides
function also accepts presentation content composed using markup. However, you need to set the allow_unsafe_html
argument to True
. Please note that the component does not do any sanitization of the markup before injecting it into the HTML presentation. This means that you are responsible for ensuring that the markup is safe and does not contain any malicious code.
# The default value for the allow_unsafe_html argument is False
response_dict = rs.slides(content_markup, allow_unsafe_html=True)