Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-power-tooltip
Advanced tools
Readme
A powerful and elegant alternative for all your tooltips and menu needs.
Check out the documentation & demo pages to to see all use cases.
npm install react-power-tooltip
import React, { Component } from "react";
import Tooltip from "react-power-tooltip";
class Example extends Component {
state = {
show: false
}
showTooltip = bool => {
this.setState({ show: bool })
}
render() {
return (
<div
style={{ position: 'relative' }}
onMouseOver={() => this.showTooltip(true)}
onMouseLeave={() => this.showTooltip(false)}
>
<Tooltip show={this.state.show}>
<span>Option 1</span>
<span>Option 2</span>
</Tooltip>
</div>
);
}
}
export default Example;
Props | Types / Options | Default | Description |
---|---|---|---|
show | bool: false, true | false | Mount tooltip if true. |
fontFamily | string: font family | 'inherit' | Font family of text |
fontSize | string: px | 'inherit' | Font size of text |
fontWeight | string | 'bold' | Font weight of text |
color | string | 'inherit' | Font color of text |
animation | string: fade or bounce | 'fade' | Mount/Unmount anmation. Custom animations: See advanced usage examples. |
hoverBackground | string: hex colors | '#ececec' | Background color on hover |
hoverColor | string: hex colors | '#000000' | Font color on hover |
backgroundColor | string: hex colors | '#ffffff' | Background color |
alert | string: rgb colors | false | Pulse animation |
textBoxWidth | string: px or auto | '150px' | Width of the text box |
padding | string: px | '15px 20px' | Padding of text |
borderRadius | string: px | '5px' | Radius of corners |
zIndex | string: number | '100' | Z-index of tooltip |
moveDown | string: px | '0px' | Downward position adjustment |
moveRight | string: px | '0px' | Right position adjustment |
static | boolean: false or true | false | Disable hover animations |
flat | boolean: false or true | false | Disable shadows |
lineSeparated | boolean: false or true or string: css border property | '1px solid #ececec' | Enable ∓ specify line separation between options |
arrowAlign | string: 'start' or 'center' or 'end' | 'start' | Positions arrow relative to textbox |
position | string: 'position1 position2' | 'right center' | Positions tooltip relative to target element |
You're welcome to contribute to react-power-tooltip.
To set up the project:
$ npm install
$ npm run dev
The demo page will then be served on http://localhost:8000/ in watch mode, meaning you don't have refresh the page to see your changes.
Justin Rhodes |
MIT
FAQs
A powerful tooltip and menu component library for react.
The npm package react-power-tooltip receives a total of 718 weekly downloads. As such, react-power-tooltip popularity was classified as not popular.
We found that react-power-tooltip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.