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

react-tailwind-tooltip

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tailwind-tooltip

React tailwind tooltip is a React component for creating customizable tooltips using Tailwind CSS. It provides flexibility in tooltip placement, appearance, and behavior, making it easy to enhance user interfaces with informative tooltips.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-75%
Maintainers
0
Weekly downloads
 
Created
Source

React tailwind tooltip

React tailwind tooltip is a React component for creating customizable tooltips using Tailwind CSS. It provides flexibility in tooltip placement, appearance, and behavior, making it easy to enhance user interfaces with informative tooltips.

TypeScript React TailwindCSS DaisyUI

PNPM Licence

Installation:

Install with npm:

npm install react-tailwind-tooltip

Install with yarn:

yarn add react-tailwind-tooltip

Install with pnpm:

pnpm add react-tailwind-tooltip

License

This project is licensed under the MIT License - see the LICENSE file for details.

Repository

For more information, issues, and contributions, visit the GitHub repository.

Example Usage:

import React from 'react';
import { Tooltip } from 'react-tailwind-tooltip';

const App = () => {
  return (
    <div className="p-6">
      <Tooltip title="This is a tooltip!" placement="top" arrow>
        <button className="px-4 py-2 bg-blue-500 text-white rounded">Hover me</button>
      </Tooltip>
    </div>
  );
};

export default App;

You can also insert styles - import 'react-tailwind-tooltip/dist/index.css'

Properties

NameTypeDescription
childrenReact.ReactNodeThe element that the tooltip will be attached to.
titleReact.ReactNodeThe content of the tooltip.
placement*top | bottom | left | rightTThe preferred position of the tooltip. Default bottom
followCursor*booleanWhether the tooltip should follow the cursor. Default false
arrow*booleanWhether to display an arrow pointing to the element. Default false
open*booleanControl the visibility of the tooltip.
onOpen*(event: React.MouseEvent<HTMLDivElement, MouseEvent>) => voidCallback function triggered when the tooltip opens.
onClose*(event: React.MouseEvent<HTMLDivElement, MouseEvent>) => voidCallback function triggered when the tooltip closes.

Props marked with * are not required.

Keywords

FAQs

Package last updated on 18 Jul 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

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