The `rc-tooltip` package provides a highly customizable and unstyled React tooltip component, focusing on core functionality like positioning, event triggers, and state management. It allows developers to integrate robust tooltip behavior while maintaining full control over the visual presentation, aligning with a 'bring your own UI' philosophy. The version requested, 6.4.0, was the last major release under the `rc-tooltip` package name. However, active development and new features for this component have transitioned to the `@rc-component/tooltip` package, currently at version 1.x.x. While `rc-tooltip` 6.4.0 remains functional for its intended purpose, it is effectively superseded, and new projects or those requiring ongoing updates and accessibility enhancements should migrate to the `@rc-component/tooltip` package. The original `rc-tooltip` package's last update was approximately three years ago.
npm install rc-tooltipVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of `rc-tooltip` with a button, showing how to define overlay content, placement, and trigger events with custom delays.
Migrate your dependencies from `rc-tooltip` to `@rc-component/tooltip`. This may involve adjusting import paths and reviewing prop changes as the new package evolves.
It is highly recommended to upgrade to the `@rc-component/tooltip` package to ensure you receive ongoing maintenance, security patches, and new features, including enhanced accessibility (`a11y`) support.
For CommonJS, ensure `const Tooltip = require('rc-tooltip');` is used. For modern JavaScript and TypeScript projects, always prefer `import Tooltip from 'rc-tooltip';`.Ensure `rc-tooltip` is installed: `npm install rc-tooltip` or `yarn add rc-tooltip`. Verify the import path for CSS is correct.
Install React and ReactDOM if not present: `npm install react react-dom` or `yarn add react react-dom`. Check the peer dependency requirements in your `package.json` for `rc-tooltip`.
Verify that the `trigger` prop is correctly set (e.g., `['hover', 'focus']`). Ensure the `overlay` prop has valid React content. Inspect CSS for z-index conflicts or hidden overflow on parent elements.