StippleUI.Tooltips.tooltip - Function
tooltip(args...; kwargs...)tooltip(fieldname::Symbol, args...; kwargs...)The tooltip component is to be used when you want to offer the user more information about a certain area in your App. When hovering the mouse over the target element (or quickly tapping on mobile platforms), the tooltip will appear.
Examples
View
julia> btn("Hover me", color="primary", [
tooltip("Some text as content of Tooltip")
])
julia> Html.div(class="inline bg-amber rounded-borders cursor-pointer", style="max-width: 300px", [
Html.div(class="fit flex flex-center text-center non-selectable q-pa-md", "I am groot!<br>(Hover me!)", [
tooltip("I am groot!")
])
julia>
])Arguments
- Behaviour
transitionshow::String- Support for inbuilt transitions ex.fadeslide-downtransitionhide::String- Support for inbuilt transitions ex.fadeslide-downscrolltarget::String- CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one ex.scrolltarget=".scroll-target-class"scrolltarget="#scroll-target-id"scrolltarget="body"target::Union{String, Bool}- Configure a target element to trigger Tooltip toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) it attaches the events to the specified DOM element (if it exists) ex.target=".my-parent"target!=falsenoparentevent::Bool- Skips attaching events to the target DOM element (that trigger the element to get shown)delay::Int- Configure Tooltip to appear with delay. default value.0ex.delay!="500"hidedelay::Int- Configure Tooltip to disappear with delay. default value.0ex.hidedelay!="600"
- Content
maxheight::String- The maximum height of the Tooltip; Size in CSS units, including unit name ex.16px2remmaxwidth::String- The maximum width of the Tooltip; Size in CSS units, including unit name ex.16px2rem
- Position
anchor::String- Two values setting the starting position or anchor point of the Tooltip relative to its target ex.top lefttop middletop righttop starttop endcenter leftcenter middlecenter rightcenter startcenter endbottom leftbottom middlebottom rightbottom startbottom endself::String- Two values setting the Tooltip's own position relative to its target ex.top lefttop middletop righttop starttop endcenter leftcenter middlecenter rightcenter startcenter endbottom leftbottom middlebottom rightbottom startbottom endoffset::Vector- An array of two numbers to offset the Tooltip horizontally and vertically in pixels. default value.[14,14]ex.[5, 10]
- Style
contentclass::Union{Vector, String, Dict}- Class definitions to be attributed to the content eg.my-special-classcontentclass!="{ 'my-special-class': <condition> }"contentstyle::Union{Vector, String, Dict}- Style definitions to be attributed to the content eg.background-color: #ff0000contentstyle!="{ color: '#ff0000' }"