Skip to main content

A multi-select button group

Project description

streamlit_text_toggle

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

Installation instructions

pip install streamlit_text_toggle

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

streamlit_text_toggle-0.0.9.tar.gz (564.9 kB view details)

Uploaded Source

Built Distribution

streamlit_text_toggle-0.0.9-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file streamlit_text_toggle-0.0.9.tar.gz.

File metadata

  • Download URL: streamlit_text_toggle-0.0.9.tar.gz
  • Upload date:
  • Size: 564.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for streamlit_text_toggle-0.0.9.tar.gz
Algorithm Hash digest
SHA256 593c45a2ce217e5eae858fa8bf0c5e26193511baff2b1f3a4db5c11d2afcb2cc
MD5 9421996b35cbebff8ca8d1f26519bf76
BLAKE2b-256 e2ff9809a94d483d8a4fd316aaffabf84885930aaa54f637fe7248785938e104

See more details on using hashes here.

File details

Details for the file streamlit_text_toggle-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_text_toggle-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7ff4ad5ca827cfb059c05d8e8bcc27c9f47b491d269c4892f2b65fa87205bd45
MD5 a16811665cdc0cf1acb0d949cdc5bf52
BLAKE2b-256 b6c43172ea274eb2374efe19de3cb3b12bddedeb8251510e9a44066b9dda878e

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