Skip to content

didww/react-tooltip

Repository files navigation

React Tooltip

Simple Tooltip component

Install

npm install @didww/react-tooltip or yarn add @didww/react-tooltip

Usage

import Tooltip  from '@didww/react-tooltip';

const MyComponent = () => {
  return (
    <Tooltip title={ <span>Tooltip Title here</span> }>
      <p>Tooltip Content here</p>
    </Tooltip>
  );
};

Api

Parameter Description Type Default
title Element, which triggers tooltip appearance ReactNode - (required)
children Content of tooltip ReactNode | ReactNode[] null
placement Position of displayed tooltip content top-left | top-right | bottom-left |bottom-right top-right
maxWidth Maximum width in pixels of tooltip content number 198
className className of tooltip wrapper component string ''

About

Simple Tooltip component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published