Streamlit Custom Toggle
A custom component to load heart-shaped Toggle Switch widget
Installation ⬇
pip install streamlit-custom-toggle
Example Usage
Copy this code snippet
import streamlit as st
from streamlit_custom_toggle import st_custom_toggle
st.header('Music Choices')
col1, col2, col3 = st.columns(3, gap="small")
with col1:
calm = st_custom_toggle('Calm', active_track_fill="#EAE4E4", active_thumb_color="#EAE4E4", value="true", key="toggle1") # Disabled toggle switch
with col2:
fun = st_custom_toggle('Fun', active_track_fill="#57FD6E", active_thumb_color="#EAE4E4", key="toggle2")
with col3:
music_toggle = st_custom_toggle('Rock', active_track_fill="#FF5733", active_thumb_color="#900C3F", key="toggle3")
music = st.radio(
"Select your favorite artist",
('The Beatles', 'AC/DC', 'Pink Floyd', 'Elvis Presley', 'MÃ¥neskin'), disabled=music_toggle)
st.markdown(f"You choose {music}")
# Checking the toggle state
st.code(f"Calm = {calm}, Fun = {fun}, Rock = {music_toggle}")
References
Metadata
Release files for streamlit-custom-toggle 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit-custom-toggle-0.1.1.tar.gz | 549.1 kB | Without provenance | Details for streamlit-custom-toggle-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_custom_toggle-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for streamlit_custom_toggle-0.1.1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / streamlit-custom-toggle-0.1.1.tar.gz
| Download URL | streamlit-custom-toggle-0.1.1.tar.gz |
|---|---|
| Size | 549.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a72ca0e9ea56e31d32ee68b23dc2e6737621058c0544c7c7c0ebcc55495d1ea
|
|
BLAKE2b-256 checksum How to use checksums |
0e7f7a3252371baf29416a26c184a90ce24aa04da9581f186dbb7b87aebbbf19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / streamlit_custom_toggle-0.1.1-py3-none-any.whl
| Download URL | streamlit_custom_toggle-0.1.1-py3-none-any.whl |
|---|---|
| Size | 555.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51fda67ad1c95c8fc9abf2a6987f8ff279dad8fd5de138220d2cf4d832431f33
|
|
BLAKE2b-256 checksum How to use checksums |
41bf0b38d2db274b945def12fee8520b8cae2968ca6e6973091388d9f018a762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Security for streamlit-custom-toggle 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.