Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to mimic a text area #21

Open
pierrelouisbescond opened this issue Sep 28, 2023 · 4 comments
Open

Add option to mimic a text area #21

pierrelouisbescond opened this issue Sep 28, 2023 · 4 comments

Comments

@pierrelouisbescond
Copy link

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 :-)

@blackary
Copy link
Owner

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.

@ilyesTouz
Copy link

I am also working on a similar project, it could be a good feature to add, and it would help me greatly as well

@AlexandreVerept
Copy link

Would be a useful feature for sure for chat projects 👍

@ATelders
Copy link

ATelders commented Oct 3, 2023

I'd also be really interested in this feature, thanks a lot ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants