A Streamlit component that allows you to select from a list of options or enter a custom value.
Project description
Streamlit free text select
This component implements a selectbox that allows free text input. It is based on React-Select's 'Select' component.
Installation
pip install streamlit-free-text-select
Usage
import streamlit as st
from streamlit_free_text_select import st_free_text_select
options = ["apple", "banana", "cherry", "date", "elderberry", "fig", "grape"]
value = st_free_text_select(
label="Free text select",
options=options,
format_func=lambda x: x.lower(),
placeholder="enter question",
disabled=False,
delay=300,
)
st.write("Free text select value:", value)
Docs
Parameters
label
: str A short label explaining to the user what this input is for.options
: list A list of predefined options to choose from.format_func
: callable A callable function to format the options, defaults to None.placeholder
: str A string to display when the input is empty, defaults to None.disabled
: bool Whether the input is disabled, defaults to False.delay
: int The time in milliseconds to wait before triggering the search, defaults to 300.key
: str An optional string to use as the unique key for the widget, defaults to None.
Returns str or None The value of the free text select input.
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-free-text-select-0.0.5.tar.gz
.
File metadata
- Download URL: streamlit-free-text-select-0.0.5.tar.gz
- Upload date:
- Size: 488.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ddb450e3ac49458dbec8f869cad925f23f8fe74b46a06871e3a387fae07bbb5 |
|
MD5 | f4c599f9c0f22bfc379d14636c6c13c1 |
|
BLAKE2b-256 | 36115010397def09a09b3d9561da339b34eccf83754ed42af98f672bcbae7ea2 |
File details
Details for the file streamlit_free_text_select-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: streamlit_free_text_select-0.0.5-py3-none-any.whl
- Upload date:
- Size: 493.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec8b70d9aa68f5090473f12c29ed653052d8fdbc8fc7a33959e56467e9f4ee1 |
|
MD5 | 451635760db6d2cbc56c667c0b13ae40 |
|
BLAKE2b-256 | c06c0577f78746c1645d87d6169608c80414bee809ba5f258d31a196f7398071 |