You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-mouse-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mouse-tooltip

React Mouse Tooltip is a react component that shows a tooltip that follows the user's mouse cursor. It supports different positions, colors, animations and custom content inside the tooltip.

1.2.5
latest
npmnpm
Version published
Weekly downloads
29
Maintainers
1
Weekly downloads
 
Created
Source

React Mouse Tooltip

React Mouse Tooltip is a react component that shows a tooltip that follows the user's mouse cursor. It supports different positions, colors, animations and custom content inside the tooltip.

React Mouse Tooltip Example GIF

Installation

You can install React Mouse Tooltip using npm:

npm i react-mouse-tooltip

Usage

To use React Mouse Tooltip you need to import it into your project:

import React from 'react';
import Tooltip from 'react-mouse-tooltip';

function App() {
  return (
    <div>
      <Tooltip content="Tooltip content">
        <h1>Hello Tooltip!</h1>
      </Tooltip>
    </div>
  );
}

export default App;

Configuration

You can customize the appearance and behavior of the tooltip by passing different props to the <Tooltip /> component. Here is a list of available props and their default values:

PropTypeDefaultDescription
contentReactNode / string-Required prop. The custom content that will be displayed inside the tooltip. Can be any valid react element.
transformstringtranslate(0,25px)CSS transform property. The position of the tooltip relative to the mouse cursor.
classNamestring''
wrapperDivPropsRecord<string, any>undefinedThese props will be added to wrapper div element.
any other props...restundefinedAny other props will be added to tooltip div element

License

MIT

Free Software, Hell Yeah!

Keywords

react

FAQs

Package last updated on 03 Feb 2024

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