A simple tooltip widget for the canopy style guide
- Angular 1.3
- jQuery
- Install through npm
npm install --save cp-tooltip
- Make sure your app depends upon 'cp-tooltip':
angular.module('app', ['cp-tooltip']);
<input type="text" cp-tooltip="Hey this is the message"/>
If you'd like the tooltip instantly render, include the cp-tooltip-instant
attribute:
<input type="text" cp-tooltip="Hey this is the message" cp-tooltip-instant/>
If you want the tooltip to stay visible while the user interacts with the tooltip itself, include the cp-tooltip-allow-interaction
attribute. This is useful when you want to allow the user to highlight and copy the contents of the tooltip.
<input type="text" cp-tooltip="Hey this is the message" cp-tooltip-allow-interaction/>