This module makes rendering hovercards like Wikipedia's easy.
Render a hovercard above or below the given Browser.Dom.Element.
Call this function at the root of your HTML so the hovercard is positioned correctly.
Example:
hovercard
-- configuration
{ maxWidth = 100
, maxHeight = 100
, borderColor = Color.black
, backgroundColor = Color.lightBlue
, borderWidth = 2
}
-- Browser.Dom.Element representing
-- viewport and position of the element
element
-- additional styles for the hovercard, eg. a shadow
[ style "box-shadow" "5px 5px 5px 0px rgba(0,0,0,0.25)"
]
-- the content of the hovercard
[ div
[]
[ text "Lorem ipsum dolor sit amet"
]
]
Configure the hovercard.