A community-maintained checkbox tree component for Streamlit.
Project description
🐙 streamlit-tree-select-community
A community-maintained checkbox tree component for Streamlit, built on react-checkbox-tree.
This package is a community-maintained fork of the original streamlit-tree-select package.
Installation
Install the community-maintained package from PyPI:
pip install streamlit-tree-select-community
The Python import path remains unchanged:
from streamlit_tree_select import tree_select
Quickstart
Using streamlit-tree-select-community is as simple as importing tree_select and passing a list of nodes.
import streamlit as st
from streamlit_tree_select import tree_select
st.title("🐙 Streamlit-tree-select")
st.subheader("A simple and elegant checkbox tree for Streamlit.")
# Create nodes to display
nodes = [
{"label": "Folder A", "value": "folder_a"},
{
"label": "Folder B",
"value": "folder_b",
"children": [
{"label": "Sub-folder A", "value": "sub_a"},
{"label": "Sub-folder B", "value": "sub_b"},
{"label": "Sub-folder C", "value": "sub_c"},
],
},
{
"label": "Folder C",
"value": "folder_c",
"children": [
{"label": "Sub-folder D", "value": "sub_d"},
{
"label": "Sub-folder E",
"value": "sub_e",
"children": [
{"label": "Sub-sub-folder A", "value": "sub_sub_a"},
{"label": "Sub-sub-folder B", "value": "sub_sub_b"},
],
},
{"label": "Sub-folder F", "value": "sub_f"},
],
},
]
return_select = tree_select(nodes)
st.write(return_select)
Properties
The tree select can be customized using the following parameters:
| Property | Type | Description | Default |
|---|---|---|---|
nodes |
list | A list containing tree nodes and their children. A node needs to include a label and a value. Furthermore, a list of children can be added. Further possible parameters: className (a class name to add to the node, default None), disabled (whether the node should be disabled, default False), showCheckbox (whether the node should show a checkbox, default True), title (a custom title attribute for the node, default None). |
[] |
check_model |
str | Specifies which selected nodes should be returned. Possible inputs: "all", "leaf". | 'all' |
checked |
list | A list of selected nodes. | [] |
direction |
str | Specify the direction of the component. Left-to-right ('ltr') or right-to-left ('rtl'). | 'ltr' |
disabled |
bool | If True, the component will be disabled and cannot be used. | False |
expand_disabled |
bool | If True, nodes cannot be expanded. | False |
expand_on_click |
bool | If True, nodes will be expanded by clicking on the labels. | False |
expanded |
list | A list of expanded node values. | [] |
no_cascade |
bool | If True, toggling a parent node will not cascade its check state to its children. | False |
only_leaf_checkboxes |
bool | If True, checkboxes will only be shown for leaf nodes. | False |
show_expand_all |
bool | If True, buttons for expanding and collapsing all parent nodes will appear in the tree. | False |
Returns
tree_select returns a dictionary containing the selected checked node values and expanded node values.
| Property | Type | Description | Default |
|---|---|---|---|
checked |
list | A list of checked node values. | [] |
expanded |
list | A list of expanded node values. | [] |
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_tree_select_community-0.1.3.tar.gz.
File metadata
- Download URL: streamlit_tree_select_community-0.1.3.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b934755515c8195e4ce08159dd5058ff187c82144e4e09797beeede053e657fd
|
|
| MD5 |
e050fdc31141911db4317d31d9a0defd
|
|
| BLAKE2b-256 |
6e00d2e45a1d6abbc80f85731a97225cbb3549cd667b8776d1d5fcb9b1401a39
|
Provenance
The following attestation bundles were made for streamlit_tree_select_community-0.1.3.tar.gz:
Publisher:
publish.yml on thilina227/streamlit_tree_select
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
streamlit_tree_select_community-0.1.3.tar.gz -
Subject digest:
b934755515c8195e4ce08159dd5058ff187c82144e4e09797beeede053e657fd - Sigstore transparency entry: 1584595120
- Sigstore integration time:
-
Permalink:
thilina227/streamlit_tree_select@f9fef92b9e8e94567b1e290a01999ef025ce34fb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/thilina227
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9fef92b9e8e94567b1e290a01999ef025ce34fb -
Trigger Event:
release
-
Statement type:
File details
Details for the file streamlit_tree_select_community-0.1.3-py3-none-any.whl.
File metadata
- Download URL: streamlit_tree_select_community-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98e599b406dd5ed28ac27f6138a42e1722d7a0c9c0e2707d102d489abca713f5
|
|
| MD5 |
45904020fc5b81480e5a4f0cb8a98a94
|
|
| BLAKE2b-256 |
fbdbb7303ffa360509f8caa2f661f2810c8f59b2d3b0d84272389307d5b0da59
|
Provenance
The following attestation bundles were made for streamlit_tree_select_community-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on thilina227/streamlit_tree_select
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
streamlit_tree_select_community-0.1.3-py3-none-any.whl -
Subject digest:
98e599b406dd5ed28ac27f6138a42e1722d7a0c9c0e2707d102d489abca713f5 - Sigstore transparency entry: 1584595231
- Sigstore integration time:
-
Permalink:
thilina227/streamlit_tree_select@f9fef92b9e8e94567b1e290a01999ef025ce34fb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/thilina227
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9fef92b9e8e94567b1e290a01999ef025ce34fb -
Trigger Event:
release
-
Statement type: