New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/tooltip

Package Overview
Dependencies
Maintainers
2
Versions
491
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/tooltip

A React Component for rendering dynamically positioned Tooltips

2.3.1
latest
Source
npm
Version published
Weekly downloads
440K
-4.14%
Maintainers
2
Weekly downloads
 
Created

What is @chakra-ui/tooltip?

@chakra-ui/tooltip is a component library for creating tooltips in React applications. It provides a simple and customizable way to add tooltips to your UI elements, enhancing user experience by providing additional information on hover or focus.

What are @chakra-ui/tooltip's main functionalities?

Basic Tooltip

This feature allows you to create a basic tooltip that appears when the user hovers over or focuses on the target element.

```jsx
import { Tooltip } from '@chakra-ui/react';

function BasicTooltip() {
  return (
    <Tooltip label="Hello, World!">
      <span>Hover over me</span>
    </Tooltip>
  );
}
```

Custom Tooltip Placement

This feature allows you to customize the placement of the tooltip. You can place it at the top, right, bottom, or left of the target element.

```jsx
import { Tooltip } from '@chakra-ui/react';

function CustomPlacementTooltip() {
  return (
    <Tooltip label="Hello, World!" placement="right">
      <span>Hover over me</span>
    </Tooltip>
  );
}
```

Tooltip with Delay

This feature allows you to add a delay before the tooltip appears and disappears, providing a smoother user experience.

```jsx
import { Tooltip } from '@chakra-ui/react';

function DelayedTooltip() {
  return (
    <Tooltip label="Hello, World!" openDelay={500} closeDelay={500}>
      <span>Hover over me</span>
    </Tooltip>
  );
}
```

Custom Tooltip Styling

This feature allows you to customize the styling of the tooltip, including background color, text color, and font size.

```jsx
import { Tooltip } from '@chakra-ui/react';

function StyledTooltip() {
  return (
    <Tooltip label="Hello, World!" bg="teal.500" color="white" fontSize="md">
      <span>Hover over me</span>
    </Tooltip>
  );
}
```

Other packages similar to @chakra-ui/tooltip

Keywords

react

FAQs

Package last updated on 09 Nov 2023

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