rnc

react-native-clipboard-toast

React Native Clipboard API with Animated toast message component

Showing:

Popularity

Downloads/wk

75

GitHub Stars

9

Maintenance

Last Commit

6mos ago

Contributors

1

Package

Dependencies

2

License

MIT

Type Definitions

Built-In

Tree-Shakeable

Yes?

Categories

Readme


npm version npm downloads npm stars npm license

react-native-clipboard-toast

React Native Clipboard API with Animated toast message component


Support both Android and iOS | Used react native Clipboard | Toast by calling api

react-native-clipboard-toast-gif

Install

npm install react-native-clipboard-toast

or

yarn add react-native-clipboard-toast


Import the package

import ClipboardToast from 'react-native-clipboard-toast';

Calling api
<ClipboardToast
    textToShow={`Top toast with 1 second delay`}
    textToCopy={"Top text"}
    toastText={"Text copied to clipboard!"}
    id={'top'}
    containerStyle={{backgroundColor: "#DDDDDD", padding: 10, borderRadius: 5}}
    textStyle={{ fontSize: 18, color: "#223345" }}
    accessibilityLabel={"click me to copy"}
    toastPosition={'top'}
    toastDelay={1000}
    toastOnShow={()=>{console.log('Is Copied')}}
  />

Reference

Props

NameDefaultTypeDescription
textToShownullStringThe text that will show (clickabily)
textToCopynullStringThe text that will be copied to the clipboard
toastText'Text is copied'StringThe text that will show on the toast
containerStylenullStyle
textStylenullStyle
id'someKey'Number/StringKey of element
accessibilityLabelnullStringAccessibility label text
toastDuration750NumberThe duration of the toast. (milliseconds)
toastPosition'bottom'stringThe position of toast showing on screen (there are 3 options - 'bottom, 'center' and 'top')
toastDelay0NumberThe delay duration before toast start showing on screen.
toastAnimationtrueBoolShould preform an animation on toast showing or disappearing.
toastHideOnPresstrueBoolShould hide toast that showing by pressing on the toast.
toastBackgroundColornullStringThe background color of the toast.
toastTextColornullStringThe text color of the toast.
toastOnShownullFunctionCallback for toast`s appear animation start

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Author

Made by Idanlevi1.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial