1.4.0 • Published 1 year ago

react-tooltip-wrapper v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-tooltip-wrapper 👋

Provides a components to create tooltips

Installation

npm i react-tooltip-wrapper

Demo and API 👀

https://axelmry.com/react-tooltip-wrapper (...with code 😉)

Usage 💻

import React from 'react'
import { TooltipWrapper } from 'react-tooltip-wrapper'

const Example = () => {
    return (
        <TooltipWrapper 
        tooltip={<><h1>Tooltip</h1><p>Hi, I'm a tooltip 🙂</p></>} 
        >
            Hover me to see who I am...
        </TooltipWarrper>
    )
    
}

export default Example

If tooltip is set to null, an empty string or undefined : the tooltip won't show at all.

Dependencies

This project relies on react-popper

API ✔

Propertiestypedefaultdescription
tooltipany""The element to be displayed inside the tooltip
tooltipStyleobject{}The CSS styling of the tooltip
placementstring"bottom"The placement of the tooltip. See react-popper documentation
onShowfunctionnullA callback function for when the tooltip is shown
onHidefunctionnullA callback function for when the tooltip is hidden
offsetint10The offset of the tooltip from the element (higher = further)
1.2.0

1 year ago

1.1.1

1 year ago

1.0.2

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.0.4

1 year ago

1.3.0

1 year ago

1.0.3

1 year ago

0.0.1

1 year ago

0.0.2

1 year ago

0.1.1

6 years ago

0.1.0

6 years ago