{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/3"},{"label":"Information Analysis","url":"https://skillfed.io/packages/category/scientific-engineering-information-analysis/2"},{"label":"Front-Ends","url":"https://skillfed.io/packages/category/database-front-ends"},{"label":"Visualization","url":"https://skillfed.io/packages/category/scientific-engineering-visualization"},{"label":"Widget Sets","url":"https://skillfed.io/packages/category/software-development-widget-sets"},{"label":"Spreadsheet","url":"https://skillfed.io/packages/category/office-business-financial-spreadsheet"}],"enrichment":{"capability":"Detects and returns the active theme (light or dark) of a running Streamlit app, updating dynamically when the user changes the theme.","skillfed_tags":["streamlit-component","theme-detection"],"use_cases":["Dynamically style a Streamlit app's custom content based on whether the user has selected light or dark mode","Detect the initial theme setting to apply a fallback configuration when st-theme returns None on first load","Build theme-aware custom components that respond to the active Streamlit theme without requiring manual user input","Log or track theme preferences in a Streamlit analytics or monitoring system"],"what_it_does":"st-theme is a Streamlit component that queries the active theme of a running Streamlit app and returns it as a dictionary of style settings. It integrates directly into a Streamlit app's frontend to detect whether the user has selected light or dark mode, and updates the returned value whenever the user manually changes the theme after the app is running.\n\nThe package is designed to be lightweight and non-intrusive: by default it applies a CSS adjustment to remove the empty space that Streamlit normally reserves for rendered components, since st-theme only communicates with the frontend and renders nothing visible. This behavior can be disabled via the adjust parameter if it conflicts with your app's layout. The main gotcha is a known browser-dependent timing issue where the theme may not be returned immediately on first load, though it updates normally when the user switches themes afterward.","worth_installing":"Yes, with conditions. Install if you need to detect and respond to Streamlit's active theme in your app and can work around the known initial-load timing issue by providing a fallback. The low install friction, permissive license, and stable classifier make it straightforward to add. However, the 833-day maintenance gap means no recent bug fixes or Streamlit version updates\u2014verify compatibility with your Streamlit version before relying on it in production."},"id":"st-theme","links":{"html":"https://skillfed.io/packages/st-theme","md":"https://skillfed.io/packages/st-theme.md","pypi":"https://pypi.org/project/st-theme/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-05-03","license_spdx":null,"license_treatment":"permissive","name":"st-theme","python_support":"supports_current","summary":"A component that returns the active theme of the Streamlit app."},"popularity":{"monthly_downloads":314184,"position":7703,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.2.3"}
