Text input that renders on keyup
Project description
streamlit-keyup
If you're collecting text input from your users in your streamlit app, st.text_input
works well -- as long as you're happy with
waiting to get the response when they're finished typing.
But, what if you want to get the input out, and do something with it every time they type a new key (AKA "on keyup")?
Installation
pip install streamlit-keyup
Usage
import streamlit as st
from st_keyup import st_keyup
value = st_keyup("Enter a value", key="0")
# Notice that value updates after every key press
st.write(value)
# If you want to set a default value, you can pass one
with_default = st_keyup("Enter a value", value="Example", key="1")
# If you want to limit how often the value gets updated, pass `debounce` value, which
# will force the value to only update after that many milliseconds have passed
with_debounce = st_keyup("Enter a value", debounce=500, key="2")
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
streamlit-keyup-0.2.4.tar.gz
(7.3 kB
view details)
Built Distribution
File details
Details for the file streamlit-keyup-0.2.4.tar.gz
.
File metadata
- Download URL: streamlit-keyup-0.2.4.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca5a050bcca339f1099ae89d053ed19310ae3d74d764fcd71493a53372819d96 |
|
MD5 | 469e978f361373ab87f5234619032a88 |
|
BLAKE2b-256 | 6fdd4a714e9996abfaf654605da83455037e02409cb716df1441e77c3cf956e6 |
File details
Details for the file streamlit_keyup-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: streamlit_keyup-0.2.4-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdef2ce6307bfed7db1be93a7194dec5d25e06f500edddc9e9094a33f8770578 |
|
MD5 | d2ed8d3e89316f34620198b0fde8b46c |
|
BLAKE2b-256 | aea8e877a7a7e9fc41ba1059ca1ba876b77ef8f6591d3ebfbf72efe21258105b |