Skip to content

Path-of-Tools/poe-item-hover-react

Repository files navigation

npm version

Path of Exile Item Hover

This repo uses poe-itemtext-parser under the hood to generate the properties needed to display the items.

Install

Install with your favorite package manager:

npm install poe-item-hover --save

Usage

Important

Make sure to NOT do CTRL - Alt - C as the item parser will not work.

const exampleItem = `CTRL-C item from in-game`;

import 'poe-item-hover/dist/index.css';
import { ItemHover } from 'poe-item-hover';

function MyFancyItem() {
    const [hovered, setHovered] = useState(false);

    return (
        <div 
            onMouseEnter={() => setHovered(true)}
            onMouseLeave={() => setHovered(false)}>
        {hovered && <ItemHover itemData={exampleItem} />}
        </div>
    )
}

Example

This is an example of how the item hover will look like in practice

Item hover in action

About

Item hovers for React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published