Skip to main content

A Streamlit component for toggle button sets (Fork)

Project description

streamlit-toggle-button-set

A button can be used to group related options (multi-select & single select), inspired by React Material UI.

Installation instructions

pip install streamlit-toggle-button-set

Usage instructions

alt text

import streamlit as st
from toggle_button_set import toggle_button_set

outcome = toggle_button_set(
    button_list=['a', 'b', '1', '2'],
    default=['a', '1'],
    color="primary",
    size="large",
    exclusive=False,
    use_container_width=False
)

st.write(outcome)

Arguments

Required:

  • button_list

Optional:

  • default = [] - must be a subset of button_list, these options are automatically selected upon boot.
  • color = "standard" - The color of the button when it is selected, options includes 'standard', 'primary', 'secondary', 'error', 'info', 'success' and 'warning'.
  • size = "medium" - The size of the component, options includes 'small', 'medium' and 'large'.
  • exclusive = False - forces only one item to be selected from button_list.
  • use_container_width = False - will make the component take up the full width of its container.
  • key = None - optional key

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file streamlit_toggle_button_set_improved-0.1.1.tar.gz.

File metadata

File hashes

Hashes for streamlit_toggle_button_set_improved-0.1.1.tar.gz
Algorithm Hash digest
SHA256 41be7c6d71ce75a9b83ce372fc83849015e4b92dc1ff1b38d146a7e64b7c169f
MD5 e95eaf9bfcc64badd61c6da502906045
BLAKE2b-256 259b245eafb4cdff896f228676d229c4ca65b61c1084ff990fddf6acd19f8799

See more details on using hashes here.

File details

Details for the file streamlit_toggle_button_set_improved-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_toggle_button_set_improved-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75d11c3d3002db0c21fceac1d6586c3906e3fb9e41f58f8a60cab2da009825a6
MD5 75c7cab024450e7fa33b4ed5f87b1114
BLAKE2b-256 ded8c28636025c02135ae380748ee7de5c331a3726da606873b83735f2e88780

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page