Skip to main content

inno-popover

tooltip on hover (right)

Text

tooltip on click (bottom)

Text

Properties

PropertyAttributeDescriptionTypeDefault
closableclosablePopover will have a close button. Has no effect if trigger type is 'hover'.booleanfalse
forforCss selector of the element the popover is for. This is just the initial value, don't update it manually. Use the 'updateForElement(...)' method instead.stringundefined
hasBackdrophas-backdropPopover should have a backdrop. Has no effect if trigger type is 'hover'.booleanfalse
offsetoffsetOffset of the popover position in pixels. Please note that the offset will remain the same in case the desired placement does not fit.number8
placementplacementPosition of the popover. If there is not enough space it will be automatically placed to where it has enough place. Please note that the offset will remain the same in case the desired placement does not fit."bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"'top'
popoverTextpopover-textContents of the text. Can be either html or a simple string. Can be omitted. You can use this property if you want a simple tooltip, otherwise you can provide your own html directly.stringundefined
popoverTitlepopover-titleContents of the title. Can be either html or a simple string. Can be omitted.stringundefined
triggertriggerHow to show the popover. If set to 'manual' then you need to programatically modify the 'visibile' property."click" | "hover" | "manual"'click'
variantvariantColor variant of the popover."dark" | "light"'dark'
visiblevisibleProgramatically change whether the popover is visible or not.booleanfalse

Events

EventDescriptionType
innoPopoverHiddenFired when popover is hidden.CustomEvent<void>
innoPopoverShownFired when popover is shown.CustomEvent<void>

Methods

hideTooltip() => Promise<void>

Hide the tooltip.

Returns

Type: Promise<void>

showTooltip() => Promise<void>

Show the tooltip.

Returns

Type: Promise<void>

updateForElement(forElement?: string) => Promise<boolean>

Updates the element the popover is for including all the internal event listeners and the popover's position. If called without a parameter it will refresh the internal event listeners and the popover's position for the current target element. If called with a nonexisting selector it will refresh the internal event listeners and the popover's position for the current target element. Returns a Promise which is 'true' when the update/refresh succeded. Returns 'false' if neither the current target element nor the element from the parameter exists.

Parameters

NameTypeDescription
forElementstring

Returns

Type: Promise<boolean>

Dependencies

Used by

Depends on

Graph


Built with StencilJS