https://github.com/blackary/streamlit-keyup
Streamlit text input that returns value on keyup
https://github.com/blackary/streamlit-keyup
python streamlit streamlit-component
Last synced: about 1 year ago
JSON representation
Streamlit text input that returns value on keyup
- Host: GitHub
- URL: https://github.com/blackary/streamlit-keyup
- Owner: blackary
- License: mit
- Created: 2022-08-25T20:55:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-12T17:11:43.000Z (about 1 year ago)
- Last Synced: 2025-05-12T18:26:27.683Z (about 1 year ago)
- Topics: python, streamlit, streamlit-component
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 193
- Watchers: 2
- Forks: 27
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# streamlit-keyup
[](https://pypi.org/project/streamlit-keyup/)
[](https://pypistats.org/packages/streamlit-keyup)
[](LICENSE)
[](https://github.com/psf/black)
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")?
[](https://key-up.streamlitapp.com)

## Installation
`pip install streamlit-keyup`
## Usage
```python
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")
```