Tooltip JS

Assign a message to show on hover.

The Infield Fly Rule ? is not called in a consistent manner. Just ask the St Louis Cardinals.

import {Tooltip} from 'uniform';
new Tooltip({
    anchor: document.getElementById('example-1'),
    content: "The umpire's declaration of an infield fly means..."
})

Options

Option Type Description Default
anchor Element Element to anchor content to. REQUIRED
content HTML HTML to render into popover. REQUIRED
align String How to align the popover to the anchor left|right|top|bottom 'top' OPTIONAL
container Element Element to append popover to. document OPTIONAL
timeout Integer in ms How long the tooltip stays before hiding. 300 OPTIONAL