Skip to main content

WithTooltip

import { WithTooltip } from '@dr.pogodin/react-utils';

WithTooltip implements a simple to use tooltip component, themed using React Themes library.

Demo

Find the source code below.

Properties

WithTooltipTheme

See React Themes docs to learn how the visual theming of themed components works. The valid theme keys for WithTooltip are:

  • appearance - The animation of tooltip appearance.
  • arrow - The open tooltip's wrapper.
  • container - The open tooltip's container.
  • content - The open tooltip's content.
  • wrapper - The <div> wrapper created around the rendered component children.

Examples

import { WithTooltip } from '@dr.pogodin/react-utils';

export default function WithTooltipExample() {
return (
<WithTooltip tip="This is an example tooltip">
<p>Hover to see the tooltip.</p>
</WithTooltip>
);
}