Skip to content

Enhance User Feedback for Copy Action in CopyToClipboardBtn Component #10069

@0xprathamesh

Description

@0xprathamesh

Is your feature request related to a problem?

Yes, the current implementation of the CopyToClipboardBtn component does not provide feedback to the user when the text is copied. Users are not aware if the copy action was successful when they click on the copy icon.

Describe the solution you'd like

Add an onCopy event handler to the CopyToClipboardBtn component to set a copied state. Display a confirmation Tootltip, such as "Copied!", when the text is successfully copied. This will give users immediate feedback and improve the user experience.

Describe alternatives you've considered

  1. Using a toast notification library to show a notification when the text is copied.
  2. Making the copy icon to pop-up for the bit temporarily to indicate the copy action was successful.
  3. Simply by changing the color of the icon.

Additional context

Before

Copy icon image to change

After

Screenshot 2024-07-09 at 12 53 17 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions