{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Streamlit-js-eval lets you run arbitrary JavaScript expressions from a Streamlit app and return their results, enabling access to browser APIs like geolocation, clipboard, device width, and user agent that are unavailable or difficult in pure Python.","skillfed_tags":["browser-integration","streamlit-component"],"use_cases":["Detect whether a user is on a mobile device by checking screen width and adapting the UI layout accordingly.","Request and retrieve user geolocation with error handling for permission denial or unavailable position.","Copy data to the user's clipboard or read clipboard contents programmatically from a Streamlit app.","Access browser metadata like user agent, language preference, or page URL components for analytics or personalization.","Implement Android-specific features like the native share sheet in a Streamlit web app."],"what_it_does":"Streamlit-js-eval is a custom Streamlit component that bridges Python and the browser by executing arbitrary JavaScript expressions and returning their results. It exposes browser APIs\u2014geolocation, clipboard, device dimensions, user agent, language preferences, and Android sharing\u2014that are either unavailable or cumbersome to access from pure Python Streamlit code. The package includes convenience wrappers for common tasks like `get_geolocation()` and `get_page_location()`, with error handling for permission denials and failures.\n\nYou use it by calling `streamlit_js_eval()` with a JavaScript expression string and a unique key, or by invoking pre-built functions for specific browser capabilities. It's useful when your Streamlit app needs to adapt to the user's device or environment\u2014detecting mobile screens, reading cookies, writing to clipboard, or requesting location permission\u2014without leaving the Streamlit framework.","worth_installing":"Yes, if you need browser API access in Streamlit and accept the maintenance risk. Install friction is low and the package has no known vulnerabilities. However, verify the license terms first (currently unclear), and be aware that maintenance is aging\u2014last release was 217 days ago. The known limitation with st.button in branching contexts may affect some use cases; check whether the bootstrapButton workaround suits your needs."},"id":"streamlit-js-eval","links":{"html":"https://skillfed.io/packages/streamlit-js-eval","md":"https://skillfed.io/packages/streamlit-js-eval.md","pypi":"https://pypi.org/project/streamlit-js-eval/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2026-01-09","license_spdx":null,"license_treatment":"unclear","name":"streamlit-js-eval","python_support":"supports_current","summary":"A custom Streamlit component to evaluate arbitrary Javascript expressions."},"popularity":{"monthly_downloads":120848,"position":12008,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.0"}
