component-template icon indicating copy to clipboard operation
component-template copied to clipboard

Add children to a custom component

Open MehdiChelh opened this issue 4 years ago • 0 comments

Hello, First thank you for this amazing project 👍 ! I tried to create a custom component with the ability to add children to the component (text, map, bar_chart...), similar to what can be done using st.columns

What I would like to do for example with this component, is something like:

el1, el2 = my_component(2)
el1.write("this is in element 1")
el2.bar_chart(hist_values)
  • Is it possible using component-template ? Or should it be done in some way with streamlit's DeltaGenerator class or something similar ?

I am quite new to streamlit, so I don't really know where to start and if it is even possible.

Thanks!

MehdiChelh avatar Oct 22 '21 06:10 MehdiChelh