Phasetips is a tooltip UI component made to be used with PhaserJS game framework.
Download it here or check the source code: https://github.com/netgfx/Phasetips
Let’s see how that works
To create a simple tooltip with a text that hovers over the target item all you have to do is:
targetObject: targetObj, //can be any phaser object (sprite, group, text, image, etc...)
context: "A cute bunny but with a lot of text, that needs to wrap!",
strokeColor: 0xff0000, // red stroke
position: "top" // where we want the tooltip to appear
The event listeneres for hoverOver/hoverOut are added via the plugin automatically.