streamlit-toggle-switch
Creates a customizable toggle
What it is and what it does
streamlit-toggle-switch is a Streamlit component library that provides a single widget: a toggle switch with customizable appearance. It wraps the underlying Streamlit framework to expose a `st_toggle_switch()` function that renders an interactive on/off control in your app, letting you set the label text, colors for active and inactive states, track color, and whether the label appears before or after the switch itself.
The package depends only on Streamlit and is installed as a pure Python wheel. It is designed for developers building Streamlit dashboards or data apps who need a styled toggle input beyond Streamlit's built-in checkbox. However, the project has been abandoned since late 2023 with no maintenance activity, so it may not work with newer Streamlit releases and will receive no fixes for compatibility issues.
Use it for:
- Add a branded toggle switch to a Streamlit dashboard with custom colors matching your app's design system
- Build a settings panel in a Streamlit app where users enable/disable features via a styled toggle rather than a checkbox
- Create a data exploration interface where toggling between two states (e.g., 'raw' vs. 'processed' data) updates the display
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds a customizable toggle switch component to Streamlit applications, with control over colors, label placement, and active/inactive states.
Yes, if you are maintaining an existing Streamlit app that already uses this component and it works with your current Streamlit version. No, if you are starting a new project—the package is abandoned and will not receive updates. Consider using Streamlit's native checkbox or exploring actively maintained alternatives before committing to this dependency.
Install
streamlit-toggle-switch on PyPI
pip
pip install streamlit-toggle-switchuv
uv add streamlit-toggle-switchpoetry
poetry add streamlit-toggle-switchInstalling streamlit-toggle-switch
Before you install
Installation is straightforward with low friction, but the package is abandoned—last release was 2022-10-25 and no commits since 2023-04-28. It still receives moderate downloads (266395 monthly), suggesting existing projects depend on it, but expect no bug fixes or updates.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is provided. Before using in a commercial or copyleft-sensitive project, verify the actual license from the repository.
Quickstart
pip install streamlit-toggle-switch
import streamlit as st
import streamlit_toggle as tog
tog.st_toggle_switch(label="Label", key="Key1", default_value=False, active_color="#11567f")
Verify before relying
- Whether the unclear license is compatible with your project's licensing requirements
- Whether the package works reliably with current Streamlit versions (no updates since 2022)
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — streamlit |
| Maintenance | abandoned — 1,389 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 266,395/month — #8,304 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streamlit_toggle_switch-1.0.2-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
streamlit-code-editorEmbeds an interactive code editor component…
unclear · top 15,000 on PyPI
streamlit-vertical-sliderAdds a vertical slider widget to Streamlit apps…
unclear · top 15,000 on PyPI
streamlit-sortablesStreamlit Sortables adds drag-and-drop sortable…
permissive · top 15,000 on PyPI
streamlit-antd-componentsProvides Ant Design and Mantine UI components…
unclear · top 15,000 on PyPI
streamlit-avatarRenders clickable avatar icons with images,…
unclear · top 15,000 on PyPI
streamlit-aceEmbeds an Ace code editor component into…
permissive · top 15,000 on PyPI
streamlit-option-menuA Streamlit component that renders a static…
unclear · top 15,000 on PyPI
streamlit-pdfAdds a PDF viewer component to Streamlit apps…
permissive · top 15,000 on PyPI
streamlit-camera-input-liveProvides a Streamlit component that captures…
unclear · top 15,000 on PyPI
st-themeDetects and returns the active theme (light or…
permissive · top 15,000 on PyPI