Beacon Tooltip
Component placing a beacon in the lesson, either independently or attached to a target
. Upon hovering or clicking on the beacon, a tooltip is displayed.
Options
- title |
(string|node)
: title to be displayed at the top of the tooltip. Default:none
. - content |
(string|node)
: tooltip content. Default:'
contentcomes here...'
. - event |
string
: if set toclick
, tooltip is toggled when clicking on beacon; if set tohover
, the tooltip is activated via hovering. Default:'click'
. - placement |
string
: placement of the tooltip relative totarget
(eithertop
,top-start
,top-end
,bottom
,bottom-end
,left
,left-start
,left-end
,right
,right-start
,right-end
,auto
, orcenter
). Default:'left'
. - target |
string
: class or ID selector for element to attach tooltip to. Default:''
. - offset |
number
: distance between the tooltip andtarget
in pixels. Default:15
. - onChange |
function
: callback invoked upon state change of the tooltip. Receives two arguments: theaction
(open
orclose
) and the passedprops
. Default:onChange() {}
.
Examples
Live Editor
Result
ReferenceError: Provider is not defined