Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tippyjs/react

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tippyjs/react

React component for Tippy.js

  • 4.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
521K
decreased by-10.37%
Maintainers
1
Weekly downloads
 
Created

What is @tippyjs/react?

@tippyjs/react is a React wrapper for Tippy.js, a highly customizable tooltip and popover library. It allows you to create tooltips, popovers, dropdowns, and more with ease, providing a wide range of customization options and animations.

What are @tippyjs/react's main functionalities?

Basic Tooltip

This feature allows you to create a basic tooltip that appears when you hover over an element. The tooltip content is customizable.

import Tippy from '@tippyjs/react';
import 'tippy.js/dist/tippy.css';

function App() {
  return (
    <Tippy content="Hello, World!">
      <button>Hover me</button>
    </Tippy>
  );
}

Interactive Tooltip

This feature allows you to create an interactive tooltip that can contain HTML content and can be interacted with.

import Tippy from '@tippyjs/react';
import 'tippy.js/dist/tippy.css';

function App() {
  return (
    <Tippy content={<span>Interactive Content</span>} interactive={true}>
      <button>Hover me</button>
    </Tippy>
  );
}

Custom Animation

This feature allows you to add custom animations to your tooltips. Tippy.js provides several built-in animations that you can use.

import Tippy from '@tippyjs/react';
import 'tippy.js/animations/scale.css';

function App() {
  return (
    <Tippy content="Animated Tooltip" animation="scale">
      <button>Hover me</button>
    </Tippy>
  );
}

Controlled Tooltip

This feature allows you to control the visibility of the tooltip programmatically, giving you more control over when the tooltip appears and disappears.

import Tippy from '@tippyjs/react';
import 'tippy.js/dist/tippy.css';
import { useState } from 'react';

function App() {
  const [visible, setVisible] = useState(false);

  return (
    <>
      <button onClick={() => setVisible(!visible)}>Toggle Tooltip</button>
      <Tippy content="Controlled Tooltip" visible={visible}>
        <button>Hover me</button>
      </Tippy>
    </>
  );
}

Other packages similar to @tippyjs/react

Keywords

FAQs

Package last updated on 29 Oct 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc