Well done! You now have your very first interactive Streamlit component.
But remember…you don’t want to get stuck into tutorial land, it’s time to use your newly acquired skills to build some more components! Here are some ideas to get you started.
SelectableDataFrame
and CustomDataframe
in examples
of the components template for manipulating those.While we use the React template in this tutorial—which manages a lot of boilerplate for connecting with Streamlit—remember that the frontend code is accessed from a web server and rendered inside an iFrame.
As long as you subscribe to the correct Javascript events, you can use any web tech you want to build your custom component, from Web Components with Polymer to Vue.js/Svelte/Angular or even native Javascript!
Check out the StreamlitReact.tsx file and the React-less template for a better understanding of the events to subscribe to.
If you’d like help from the community to build your component, be sure to share it under the Show the Community! category with a (WIP) in the title along with a Component tag. For example: Component: Upload Multiple Files (WIP)