Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
react-native-action-tips
Advanced tools
Cross platform tooltip for React Native.
To get started install via npm:
npm install react-native-action-tips --save
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 }}
/>
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.
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
ref | string | Yes | ref allows you to call the show() and hide() methods. | |
text | string | Yes | Text which is displayed inside the action tip. | |
visible | boolean | Yes | Controls the tooltip visibility. | |
duration | number | Yes | 2000 ms | Duration until the action tip dismisses. |
animationInDuration | number | Yes | 150 ms | Duration of fade-in animation. |
animationOutDuration | number | Yes | 700 ms | Duration of fade-out animation. |
opacity | number | Yes | 0.85 | Maximum opacity the tip should animate to. |
position | object | Yes | 0 | Absolute positioning of the component. |
containerStyle | style | Yes | Style applied to the action tip container. | |
textStyle | style | Yes | Style applied to the action tip text. | |
onHide | function | Yes | Callback when tooltip is hidden |
If you want to issue a PR, go ahead ;)
This project is licensed under the MIT License
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!
FAQs
Cross platform tooltip for React Native.
We found that react-native-action-tips demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.