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

[feat]: Add copy-to-clipboard functionality to Input + Button link sharing component #7130

Closed
2 tasks done
sumamakhan761 opened this issue Apr 5, 2025 · 1 comment · May be fixed by #7131
Closed
2 tasks done

[feat]: Add copy-to-clipboard functionality to Input + Button link sharing component #7130

sumamakhan761 opened this issue Apr 5, 2025 · 1 comment · May be fixed by #7131

Comments

@sumamakhan761
Copy link

Feature description

Currently, there are components on the site where an input displays a shareable link (e.g., http://example.com/link/to/document), but there's no built-in functionality to copy the link directly.

Screenshot

I propose enhancing the UX by adding a "Copy Link" button that uses the navigator.clipboard.writeText() API to copy the input value to the clipboard when clicked.

This can be implemented using a ref to access the input value and a simple click handler. It's a lightweight, non-breaking feature that improves usability and accessibility when sharing component links or documentation.

I'd be happy to open a PR for this.

Affected component/components

Button, Input

Additional Context

Addition this feature improves the UX for users trying to copy shareable links or generated text.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant