All Projects → marlo22 → react-sticky-mouse-tooltip

marlo22 / react-sticky-mouse-tooltip

Licence: MIT license
React tooltip component that follow mouse cursor.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to react-sticky-mouse-tooltip

React Popper Tooltip
A React hook to effortlessly build smart tooltips.
Stars: ✭ 149 (+776.47%)
Mutual labels:  popover, tooltip
Ember Tooltips
Easy and extendible tooltips for Ember components - http://sir-dunxalot.github.io/ember-tooltips/
Stars: ✭ 205 (+1105.88%)
Mutual labels:  popover, tooltip
React Layer Stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 152 (+794.12%)
Mutual labels:  popover, tooltip
Tippyjs
Tooltip, popover, dropdown, and menu library
Stars: ✭ 9,433 (+55388.24%)
Mutual labels:  popover, tooltip
toppy
Overlay library for Angular 7+
Stars: ✭ 81 (+376.47%)
Mutual labels:  popover, tooltip
Hibiscus.js
Native Angular directives for Bootstrap4
Stars: ✭ 115 (+576.47%)
Mutual labels:  popover, tooltip
React Popper
🍿⚛Official React library to use Popper, the positioning library
Stars: ✭ 2,173 (+12682.35%)
Mutual labels:  popover, tooltip
React Laag
Hooks to build things like tooltips, dropdown menu's and popovers in React
Stars: ✭ 568 (+3241.18%)
Mutual labels:  popover, tooltip
react-popper
🍿⚛Official React library to use Popper, the positioning library
Stars: ✭ 2,415 (+14105.88%)
Mutual labels:  popover, tooltip
You Dont Need Javascript
CSS is powerful, you can do a lot of things without JS.
Stars: ✭ 16,514 (+97041.18%)
Mutual labels:  popover, tooltip
Tippyjs React
React component for Tippy.js (official)
Stars: ✭ 1,081 (+6258.82%)
Mutual labels:  popover, tooltip
react-native-popable
Popovers, tooltips for React Native
Stars: ✭ 298 (+1652.94%)
Mutual labels:  popover, tooltip
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+46205.88%)
Mutual labels:  popover, tooltip
floating-ui
A low-level toolkit to create floating elements. Tooltips, popovers, dropdowns, and more
Stars: ✭ 23,485 (+138047.06%)
Mutual labels:  popover, tooltip
Sveltejs Tippy
Tippy.js for Svelte
Stars: ✭ 26 (+52.94%)
Mutual labels:  popover, tooltip
Popover
Angular CDK Popover, no default style, examples using @angular/material
Stars: ✭ 156 (+817.65%)
Mutual labels:  popover, tooltip
Popper Core
🍿 JavaScript positioning library for tooltips, popovers, dropdowns, and more
Stars: ✭ 18,903 (+111094.12%)
Mutual labels:  popover, tooltip
React Cool Portal
😎 🍒 React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body> or else.
Stars: ✭ 458 (+2594.12%)
Mutual labels:  popover, tooltip
Helipopper
🚁 A Powerful Tooltip and Popover for Angular Applications
Stars: ✭ 215 (+1164.71%)
Mutual labels:  popover, tooltip
react-layer-stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 158 (+829.41%)
Mutual labels:  popover, tooltip

react-sticky-mouse-tooltip

React tooltip component that follow mouse cursor. You can pass as children any HTML element or other React component.

Component functionality preview

Installation

npm install react-sticky-mouse-tooltip --save

or

yarn add react-sticky-mouse-tooltip

Example

import React from 'react';
import MouseTooltip from 'react-sticky-mouse-tooltip';

class Preview extends React.Component {
  state = {
    isMouseTooltipVisible: false,
  };

  toggleMouseTooltip = () => {
    this.setState(prevState => ({ isMouseTooltipVisible: !prevState.isMouseTooltipVisible }));
  };

  render() {
    return (
      <div>
        <button onClick={this.toggleMouseTooltip} style={buttonStyle}>
          Toggle mouse tooltip
        </button>
        <MouseTooltip
          visible={this.state.isMouseTooltipVisible}
          offsetX={15}
          offsetY={10}
        >
          <span>Follow the cursor!</span>
        </MouseTooltip>
      </div>
    );
  }
}

Attributes

Attribute Description Type Required Default value
visible Visibility of component. boolean No true
offsetX Offset along X axis. number No 0
offsetY Offset along Y axis. number No 0
className Tooltip div class name. string No -
style Styles properties of tooltip div. object No -

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].