.finally(React)

English
Copyright © 2023-currentdotfinally, LLC

Copy Wrapper

Copy any text to your clipboard

The Copy Wrapper component can be used by importing { CopyWrapper } from "finallyreact"

CopyWrapper can be wrapped around a component and will show a copy icon on hover. Clicking the icon will copy provided text to the user's clipboard.

Example

Hover to see a copy icon and click it to copy some text

Test your copied text here
Example

Position

Top Left

Top Right

Bottom Right

Bottom Left

Test your copied text here
Position

Icon Color

Green

Blue

Red

Test your copied text here
Icon Color

Custom Pop

Custom Pop Color

Custom Pop Icon

Test your copied text here
Custom Pop

Simple

Simple

Copy
Test your copied text here
Simple

CopyWrapper Props

Prop NameProp TypeDescription
childrenReact.ReactNodeContent to be wrapped by the copy wrapper
colorstringColor for the copy icon
copyTextstringText to be copied when the copy icon is clicked
hiddenbooleanHides the copy icon
iconPropsHTMLAttributesProps for the copy icon
location'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Location of the copy icon
popPropsPopWrapperProps for the PopWrapper component
showIconbooleanWhether to show the copy icon
simplebooleanSimple copy wrapper with minimal styles