Can't import local css and local jss in streamlit.v1.components.html

Hello @Khanifudin_Al_Khasan, welcome to the community!

If you try to reference local CSS and JS files from your HTML and expose it through Streamlit, my guess is Streamlit’s server is configured to look for local files from the static folder of its install folder and not from the root of your project (see my answer here for more info)

So you’ll either need to move your CSS/JS to the static folder, or host them on a CDN/S3/Github public repo to reference them online.

Let me know if this works :slight_smile: as I haven’t actually tested my theory

Happy Streamlitin’
Fanilo :balloon:

1 Like