Any Future Plans for Easier CSS/JavaScript Use?

Are there any plans to increase the ability to easily use CSS and Javascript in Streamlit apps? I didnā€™t see any in the roadmap.

Why Iā€™m asking: I love Streamlit, but some of the main projects Iā€™m working on involve interactive data animations and/or creatively manipulating data that require CSS & JS. I know itā€™s possible to hack Streamlit to do this ā€” eg, Faniloā€™s terrific CSS video. But I was curious if this will get easier over time; the goal of these projects are to make it easier for non-geeks to build creative dataviz. Thanks!

Just saw the terrific list of components on the community components tracker. And there are a bunch of great examples that make coming up with a component that acts as a flexible framework for css/JS seem a lot less intimidating than I thought.

1 Like

Hey @Anders

I hope the tracker motivated you to try building some quick JS components! When you get the hang of it, you can pretty much quickly integrate any interactive JS Viz library in Streamlit :slight_smile:

Iā€™d like to do a video on this to empower more people to try building components and not be intimidated by the JS ecosystem. I do think a lot of people sleep on itā€¦but I realize itā€™s a daunting task to transform people to do a small bit of JS when Streamlit sells itself as a ā€œnon JS Python frameworkā€ :grin:

My 3 favorite tutorials:

PS: well thanks to you I just added a tutorials section to the tracker :wink:

Good luck!
Fanilo

5 Likes

Thanks so much, @andfanilo! Lots of great stuff there.

And for the components tutorial youā€™re thinking about, if I can be of any help, such as trying out a rough script and giving feedback, Iā€™d be happy to. I write small amounts of stuff in JS about 1-2 times a year, so I know just enough to know where itā€™s easy to get stuck. And Iā€™ve taught some JS library workshops to nongeeks at nonprofits where I worked ā€” eg, A Taste of D3.

Besides @andfanilo 's fantastic answer, yes, this is something weā€™re trying to figure out the best way to approach. The tradeoff weā€™re working through is how to make it easy vs. make it powerful to keep the ā€œStreamlit wayā€ :slight_smile:

Best,
Randy

Thanks, @randyzwitch! And yes, keeping the ā€œStreamlit wayā€ is critical to Streamlitā€™s success.

1 Like

Hi @Anders , you may find this package interesting:

Cheers

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.