Skip to main content

A multi-select button group

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 = [] - a subset of the button_list that is selected upon rendering.
  • 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', 'large'.
  • exclusive = False - only allow one of the button_list to be selected.
  • use_container_width = False - will take up the full width of its container.

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

streamlit-toggle-button-set-0.0.5.tar.gz (553.8 kB view hashes)

Uploaded Source

Built Distribution

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