Skip to main content

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.

Contributors

hummerichsander
Sander Niels Hummerich
kevintcaron
Kevin Caron
LorianColtof
Lorian Coltof

Release Notes

  • 0.3.0: Enhancement: Support for disabled=True and updated styling to match streamlit-1.45.0. by kevintcaron
  • 0.2.0: Enhancement: Allow dynamic updating of the options. by LorianColtof
  • 0.1.2: Bug fix: Fixed issue with index=0 not selecting the first option.
  • 0.1.1: Added the label_visibility and index parameters.
  • 0.0.5: Initial release.

Metadata

Release files for streamlit-free-text-select 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-free-text-select 0.3.0
File Size Uploaded
streamlit_free_text_select-0.3.0.tar.gz 490.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-free-text-select 0.3.0
File Interpreter ABI Platform
streamlit_free_text_select-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 984.7 kB

Release files / streamlit_free_text_select-0.3.0.tar.gz

Download URL streamlit_free_text_select-0.3.0.tar.gz
Size 490.6 kB
Tags Source
SHA-256 checksum
How to use checksums
57e820108e508a947d4bf0b76c3b9fc8d27bc56c7d08b7134724a8cefe542aa2
BLAKE2b-256 checksum
How to use checksums
72fbd61b315c2679a32d58f741b7f05a3867e1c220fd257b84cc7403ee80fafb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release files / streamlit_free_text_select-0.3.0-py3-none-any.whl

Download URL streamlit_free_text_select-0.3.0-py3-none-any.whl
Size 494.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3bf9159be4361e309722a05a28d727ad2974b4f43372aac88eeb2a489edb207
BLAKE2b-256 checksum
How to use checksums
027c608d50ea9ff9bec8684a1f6fbfc52df7c703282aa07f75dd98afefefb9e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page