Skip to main content

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)

demo

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

streamlit-free-text-select-0.0.5.tar.gz (488.6 kB view details)

Uploaded Source

Built Distribution

streamlit_free_text_select-0.0.5-py3-none-any.whl (493.1 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-free-text-select-0.0.5.tar.gz.

File metadata

File hashes

Hashes for streamlit-free-text-select-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6ddb450e3ac49458dbec8f869cad925f23f8fe74b46a06871e3a387fae07bbb5
MD5 f4c599f9c0f22bfc379d14636c6c13c1
BLAKE2b-256 36115010397def09a09b3d9561da339b34eccf83754ed42af98f672bcbae7ea2

See more details on using hashes here.

File details

Details for the file streamlit_free_text_select-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_free_text_select-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6ec8b70d9aa68f5090473f12c29ed653052d8fdbc8fc7a33959e56467e9f4ee1
MD5 451635760db6d2cbc56c667c0b13ae40
BLAKE2b-256 c06c0577f78746c1645d87d6169608c80414bee809ba5f258d31a196f7398071

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