{"library":"streamlit-toggle-switch","title":"Streamlit Toggle Switch","type":"library","description":"streamlit-toggle-switch is a Streamlit custom component that provides a customizable toggle switch widget, offering options for color and placement. The current version is 1.0.2. The library has not seen updates since late 2022, and its functionality has largely been superseded by a native Streamlit widget.","language":"python","status":"deprecated","last_verified":"Sun May 17","install":{"commands":["pip install streamlit-toggle-switch"],"cli":null},"imports":["from streamlit_toggle import st_toggle_switch","import streamlit as st\non = st.toggle('Activate feature')"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/sqlinsights/streamlit-toggle-switch","docs":null,"changelog":null,"pypi":"https://pypi.org/project/streamlit-toggle-switch/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import streamlit as st\nfrom streamlit_toggle import st_toggle_switch\n\nst.title('Custom Toggle Switch Demo')\n\n# Example using the custom component\nis_enabled = st_toggle_switch(\n    label='Enable Feature X',\n    key='feature_x_toggle',\n    default_value=False,\n    label_after=True,\n    inactive_color='#D3D3D3',  # Optional\n    active_color='#11567f',   # Optional\n    track_color='#29B5E8'     # Optional\n)\n\nif is_enabled:\n    st.write('Feature X is enabled!')\nelse:\n    st.write('Feature X is disabled.')\n\nst.subheader('Native Streamlit Toggle (Recommended)')\n\nnative_toggle_on = st.toggle('Activate native feature')\nif native_toggle_on:\n    st.write('Native feature activated!')\n","lang":"python","description":"This quickstart demonstrates how to use the `streamlit-toggle-switch` component and also includes the recommended native `st.toggle` widget for comparison.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"1.0.2","pypi_latest":"1.0.2","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":15.2,"avg_import_s":1.37,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":1.51,"mem_mb":24.6,"disk_size":"447.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":15.8,"import_time_s":0.61,"mem_mb":19.9,"disk_size":"417M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":1.97,"mem_mb":26.4,"disk_size":"468.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":14.9,"import_time_s":1.07,"mem_mb":21.8,"disk_size":"437M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":2.01,"mem_mb":26.1,"disk_size":"452.0M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":14.2,"import_time_s":1.42,"mem_mb":21.1,"disk_size":"420M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":1.89,"mem_mb":26.3,"disk_size":"450.7M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":14.4,"import_time_s":1.24,"mem_mb":21.8,"disk_size":"419M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":1.34,"mem_mb":19.7,"disk_size":"432.3M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"streamlit-toggle-switch","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":16.9,"import_time_s":0.62,"mem_mb":15,"disk_size":"410M"}]}}