How to use bloxs in streamlit?
From furasโ answer in this duplicate question on Stackoverflow:
Use
B(...)._repr_html_()
to get it as HTML and put it in streamlit usingHTML component
.But
HTML component
canโt detect its height and you have to set it manually.import streamlit as st import streamlit.components.v1 as components from bloxs import B st.title('Bloxs example in Streamlit') item = B([ B(1999, "Percent change!", percent_change=10), B("๐๐๐", "Works with emojis"), B("68%", "Loading progress", progress=68), B(1234, "Bloxs in notebook!") ])._repr_html_() components.html(item, height=300) #, scrolling=True)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.