gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Add copy to clipboard button to other input types

Open armancohan opened this issue 2 years ago • 4 comments

  • [x] I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
The only input type that shows the copy to clipboard button is JSON.

Describe the solution you'd like
It would be great if users can optionally show this button for other input types such as gr.TextBox as well.

armancohan avatar Nov 01 '22 06:11 armancohan

Thanks for the suggestion @armancohan. I do think though is that this button is not too crucial for the other components since it is easy enough to select the contents of a Textbox, or right click to copy an image and the presence of such a button would clutter the UI

abidlabs avatar Nov 01 '22 23:11 abidlabs

Hi,

I also would like to have this feature, as the content of the Textbook may be very long.

thomas0809 avatar Nov 11 '22 06:11 thomas0809

👍 ok perhaps it's worth adding the Textbox component, as well as the upcoming Code component, WDYT @pngwn?

abidlabs avatar Nov 11 '22 16:11 abidlabs

I'm looking for this feature as well, really useful for text outputs.

trojblue avatar Feb 10 '23 05:02 trojblue

We could add it as an option to the components it makes sense for but might not be a great default?

pngwn avatar Feb 22 '23 11:02 pngwn

Sounds good. Fwiw since I originally commented on this issue, I have changed my mind -- I do think it would be quite useful for demos where someone is generating lots of text (e.g. speech-to-text demos)

abidlabs avatar Feb 22 '23 14:02 abidlabs

Might be useful as part of a UI toolkit used for building custom components too. This is a pretty simple issues, we just need to figure out what components to add the feature to + the api.

pngwn avatar Feb 23 '23 00:02 pngwn

Seconding.

semantium avatar Mar 07 '23 12:03 semantium

also looking forward on copy to clipboard on a textbox

JVincentG avatar Mar 09 '23 03:03 JVincentG

Hi folks! The Textbox component will support a copy button via a configurable parameter. Please see #3452 for more details. The PR is about to be merged, so the option is available if you download from main, or you can wait until the next release to pypi, which should be in the next day or two

abidlabs avatar Mar 15 '23 23:03 abidlabs