streamlit-keyup
streamlit-keyup copied to clipboard
Add option to mimic a text area
Hi @blackary , You did an awesome job with this library! I am working on a project where I'd like to have two text areas synchronized (with, obviously, one transformation between #1 and #2).
My current code is as follows:
import streamlit as st
from st_keyup import st_keyup
value = st_keyup("#1", label_visibility="hidden")
st.text_area("#2", value=value.upper(), height=200, label_visibility="hidden")
Is it feasible to add a parameter like:
value = st_keyup("#1", type="text_area", height=200, "label_visibility="hidden")
I did not spend enough time to fully understand how the library works, but it seems that you are using HTML to mimic Streamlit components, so I assume that it might be feasible.
And I'd be happy to help if I may :-)
This could definitely be done with a bit of work -- I think the best solution would be to add a st_keyup_area
function, and add some CSS to make it mimic the native streamlit textarea.
I'd very very happy for someone to add a PR for that, and otherwise I may get around to adding it eventually if there is enough interest.
I am also working on a similar project, it could be a good feature to add, and it would help me greatly as well
Would be a useful feature for sure for chat projects 👍
I'd also be really interested in this feature, thanks a lot ;)