react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

[Suggestion]: Add a "Copy" button to code blocks alongside download/fork actions

Open TheCoderGeekSquadLeader opened this issue 1 month ago • 2 comments

Summary

Add a quick-copy button to code blocks where only download or fork actions are currently available, improving developer workflow.

Page

No response

Details

When reviewing certain code snippets or file viewers, users have access to download or fork options, but lack a direct "Copy" clipboard button. Developers frequently need to copy small snippets on the fly without downloading whole files or forking repositories. Adding a standard clipboard copy button with visual feedback (e.g., a "Copied !" tooltip) would streamline this interaction.

TheCoderGeekSquadLeader avatar Oct 31 '26 19:10 TheCoderGeekSquadLeader

I understand the need of a copy button and how crucial it is for a developer exploring the code blocks. I would love to resolve this issue , kindly assign this to me . /assign-me @TheCoderGeekSquadLeader

Solankiiii01 avatar Nov 02 '26 02:11 Solankiiii01

Thanks for your interest, @Solankiiii01 I'm not a maintainer on this repository, so I can't officially assign the issue to you.

Also, just to be transparent : I originally opened this issue because I was planning to work on it myself and submit a Pull Request to implement the button. I'll start working on it shortly.

Feel free to follow the thread, and if you have any implementation ideas, don't hesitate to share them here !

TheCoderGeekSquadLeader avatar Nov 02 '26 07:11 TheCoderGeekSquadLeader