Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Streamlit text input that returns value on keyup

License

NotificationsYou must be signed in to change notification settings

blackary/streamlit-keyup

Repository files navigation

PyPI versionPyPI downloadsGitHubCode style: 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 withwaiting 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")?

Open in Streamlit

filtering

Installation

pip install streamlit-keyup

Usage

importstreamlitasstfromst_keyupimportst_keyupvalue=st_keyup("Enter a value",key="0")# Notice that value updates after every key pressst.write(value)# If you want to set a default value, you can pass onewith_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 passedwith_debounce=st_keyup("Enter a value",debounce=500,key="2")

About

Streamlit text input that returns value on keyup

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2026 Movatter.jp