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.
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
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”
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”
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.