Socket
Socket
Sign inDemoInstall

@highlight-ui/tooltip

Package Overview
Dependencies
29
Maintainers
10
Versions
177
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @highlight-ui/tooltip

Tooltip component for Highlight UI library


Version published
Weekly downloads
5.1K
increased by61.86%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

npm personio.design storybook.personio.design

@highlight-ui/tooltip

Using npm:

npm install @highlight-ui/tooltip

Using yarn:

yarn add @highlight-ui/tooltip

Using pnpm:

pnpm install @highlight-ui/tooltip

In your (S)CSS file:

@import url('@highlight-ui/tooltip');

Once the package is installed, you can import the library:

import { Tooltip } from '@highlight-ui/tooltip';

Usage

import React from 'react';
import { Tooltip } from '@highlight-ui/tooltip';

export default function TooltipExample() {
  return (
    <Tooltip
      content={<Body>This is the tooltip text.</Body>}
      placement="top"
      interactive
    >
      <b>Hover me</b>
    </Tooltip>
  );
}

Props 📜

PropTypeRequiredDefaultDescription
contentReact.ReactNodeYesContent rendered inside the tooltip pop-up
childrenReact.ReactNodeYesThe element which triggers the tooltip pop-up
idstringNoid of the tooltip
component'span', 'div'NospanCreate custom trigger element
mouseEnterDelayMouseDelayVariantNononeMouse enter delay specifying how long a tooltip takes before becoming visible
mouseOutDelayMouseDelayVariantNononeMouse out delay specifying how long a tooltip stays visible after hovering out
placement'top', 'left', 'bottom', 'right'NotopPlacement of the tooltip
interactivebooleanNotrueWhether tooltip text stays visible when user moves the pointer over its content (requires long mouseOutDelay)
classNamestringNoAllows providing a custom class name

Custom types 🔠

TypeValuesDescription
MouseDelayVariant'none', 'medium', 'long'Used by the mouseEnterDelay and mouseOutDelay props. none = 0, medium = 375, long = 1000

Contributing 🖌️

Please visit personio.design for usage guidelines and visual examples.

If you're interested in contributing, please visit our contribution page.

FAQs

Last updated on 05 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc