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

@cypress/react-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/react-tooltip

A tooltip component for React apps

0.5.4
latest
Source
npmnpm
Version published
Weekly downloads
1.4K
-35.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Tooltip renovate-app badge CircleCI

A tooltip component for React apps utilizing the excellent popper.js library.

Installation

npm install --save @cypress/react-tooltip

Usage

import Tooltip from '@cypress/react-tooltip'

<Tooltip title="Hello World">
  <button>Click me</button>
</Tooltip>

The tooltip will automatically appear when mousing over the button and disappear when mousing out from the button.

Options

optiondefaultdescriptionsupported values
titleundefinedRequired. The tooltip contentAnything renderable by React (string, number, element, etc)
placement'top'The placement of the tooltipPlacements supported by popper.js
visibleundefinedWhether to show the tooltip when rendered. This overrides the default showing/hiding on mouse-over/mouse-outtrue or false
className'tooltip'Class applied to the tooltip
wrapperClassName''Class applied to the <span> that wraps the children of <Tooltip>
updateCueundefinedA prop that indicates that the tooltip's position should update. If the size of the tooltip target changes while the tooltip is showing, the tooltip won't know to update its position. Set this to something that's tied to the target's size or just to a new value to trigger an update of the tooltip's position.

Development

# watches JS and SCSS for changes and compiles
# runs tests for associated
npm run watch

# run all tests
npm test

# creates a demo page at http:localhost:8888/design.html for design purposes
npm run design

Changelog

For latest changelog see cypress-io/react-tooltip/releases. Older changes are below:

0.2.2 - (03/10/17)

  • Add customizable tooltip border

0.2.1 - (03/10/17)

  • Fix issues with class names

0.2.0 - (03/10/17)

  • Allow specifying tooltip class name and wrapper class name

0.1.4 - (03/10/17)

  • Upgrade popper.js to 1.x.x

0.1.1 - (09/29/16)

  • Guard against updating popper state when unmounted

0.1.0 - (09/28/16)

  • Initial release

FAQs

Package last updated on 22 Nov 2022

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