Skip to contents

Create a Tooltip component

Usage

calcite_tooltip(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
closeOnClickclose-on-clickCloses the component when the referenceElement is clicked.booleanTRUE
labellabelAccessible name for the component.stringFALSE
offsetDistanceoffset-distanceOffset the position of the component away from the referenceElement.numberTRUE
offsetSkiddingoffset-skiddingOffset the position of the component along the referenceElement.numberTRUE
openopenWhen true, the component is open.booleanTRUE
overlayPositioningoverlay-positioningDetermines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. The "fixed" value should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed"."absolute" | "fixed"TRUE
placementplacementDetermines where the component will be positioned relative to the referenceElement."auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start"TRUE
referenceElementreference-elementThe referenceElement to position the component according to its "placement" value. Setting to the HTMLElement is preferred so the component does not need to query the DOM for the referenceElement. However, a string ID of the reference element can be used.Element | VirtualElement | stringFALSE

Events

The following events are observed by shiny:

EventDescription
calciteTooltipBeforeCloseFires when the component is requested to be closed and before the closing transition begins.
calciteTooltipBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calciteTooltipCloseFires when the component is closed and animation is complete.
calciteTooltipOpenFires when the component is open and animation is complete.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding text.

Examples

calcite_tooltip()
#> <calcite-tooltip></calcite-tooltip>