Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-action-tips

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-action-tips

Cross platform tooltip for React Native.

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

react-native-action-tips

All Contributors

npm npm licence npm downloads

Cross platform tooltip for React Native.

Install

To get started install via npm:

 npm install react-native-action-tips --save

Usage

Import:

 import ActionTip from 'react-native-action-tips';

You can use the imperative API to control the action tip:

const actionTipRef = useRef(null);

<ActionTip
  ref={actionTipRef}
  position={{ top: 50 }}
/>

someMethod() {
  actionTipRef.current.show("Link has been copied");
}

The declarative API for controlling the action tip:

const [isVisible, setIsVisible] = useState(false);

<ActionTip
  visible={isVisible}
  text="Link has been copied"
  position={{ top: 50 }}
/>

Notes

The action tip exposes imperative show() and hide() functions.

The position of the component can be customised through the position prop by passing an object as such { top: 0, bottom: 0, left: 0, right: 0 }. By default the component uses "absolute" positioning. This can be changed by passing style through the containerStyle prop.

Props

PropTypeOptionalDefaultDescription
refstringYesref allows you to call the show() and hide() methods.
textstringYesText which is displayed inside the action tip.
visiblebooleanYesControls the tooltip visibility.
durationnumberYes2000 msDuration until the action tip dismisses.
animationInDurationnumberYes150 msDuration of fade-in animation.
animationOutDurationnumberYes700 msDuration of fade-out animation.
opacitynumberYes0.85Maximum opacity the tip should animate to.
positionobjectYes0Absolute positioning of the component.
containerStylestyleYesStyle applied to the action tip container.
textStylestyleYesStyle applied to the action tip text.
onHidefunctionYesCallback when tooltip is hidden

Contributing

If you want to issue a PR, go ahead ;)

Authors

License

This project is licensed under the MIT License

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Luke Brandon Farrell

📖

Gabriel Ribeiro

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 04 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc