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,
    index=None,
    format_func=lambda x: x.lower(),
    placeholder="Select or enter a fruit",
    disabled=False,
    delay=300,
    label_visibility="visible",
)
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.
  • index : int An optional index to select an option by default, defaults to None.
  • 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 updating the component, defaults to 300.
  • key : str An optional string to use as the unique key for the widget, defaults to None.
  • label_visibility : str The visibility of the label, defaults to "visible". Options are "visible", "hidden", "collapsed".

Returns str or None The value of the free text select input.

Release Notes

  • 0.1.0: Added the label_visibility and index parameters.
  • 0.0.5: Initial release.

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.1.1.tar.gz (488.6 kB view details)

Uploaded Source

Built Distribution

streamlit_free_text_select-0.1.1-py3-none-any.whl (492.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for streamlit-free-text-select-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f3fb2387c94ca6da6860ca780c7dbfe924e21b50ba8a0d6f117064f525f5052
MD5 3daa428fcbbe3e98deeb68caf076343e
BLAKE2b-256 407a2599283f06b2d4f4953c81a7b4998bc347c9fefaef43212cff74153d7b2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_free_text_select-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bd01860db23f116517133ce5d0153e9e844c434090850efde6657ffd4bd76c3
MD5 ffaa4216bda7716c2cc47944182c5791
BLAKE2b-256 9ee4ce2538822b826542b2a64fe89575db091a36cc68173b51163803078f6257

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