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