Extensions

Press shift + S to search API reference.

React component

Props

interface TooltipProps
childrenReactElement<TooltipAnchorProps>

Child components to render.

classNameundefined | string

Additional class names to attach to the tooltip, separated by spaces.

contentstring | function () => ReactElement<any>

A string representing the contents. Alternatively, you can include a function that returns a React node to place into the tooltip, which is useful for things like italicization in the tooltip.

disabledundefined | false | true

If set to true, this tooltip will not be shown. Useful when trying to disable the tooltip dynamically.

fitInWindowModeFitInWindowMode

Dictates the behavior when the "normal" placement of the tooltip would be outside of the viewport. Defaults to FitInWindowModes.FLIP.

placementOffsetXundefined | number

The horizontal offset, in pixels, of the tooltip. If placementX is set to PopoverPlacements.LEFT, a higher number will move the tooltip to the left. If placementX is set to PopoverPlacements.RIGHT, a higher number moves the tooltip to the right. If placementX is set to PopoverPlacements.CENTER, this value has no effect. Defaults to 12.

placementOffsetYundefined | number

The vertical offset, in pixels, of the tooltip. If placementY is set to PopoverPlacements.TOP, a higher number will move the tooltip upward. If placementY is set to PopoverPlacements.BOTTOM, a higher number moves the tooltip downard. If placementY is set to PopoverPlacements.CENTER, this value has no effect. Defaults to 0.

placementXPopoverPlacementX

The horizontal placement of the tooltip. Defaults to PopoverPlacements.RIGHT.

placementYPopoverPlacementY

The vertical placement of the tooltip. Defaults to PopoverPlacements.CENTER.

shouldHideTooltipOnClickundefined | false | true

Should the tooltip be hidden when clicked? Defaults to false.

styleReact.CSSProperties

Additional styles names to attach to the tooltip.