Bootstrap Tooltip component, activates on hover.
Rendered as a span wrapper to fully support tooltips on disabled elements (see example in Disabled elements in the Bootstrap tooltip documentation).

Basic Usage

<HxTooltip Text="Tooltip on top">
	<HxButton Color="ThemeColor.Secondary" Text="Tooltip on top (default)" />

HxButton support

The tooltip support is also built-in in HxButton component via Tooltip parameter.

<HxButton Text="Button with a tooltip"
		  Tooltip="This is a tooltip text."
		  Color="ThemeColor.Primary" />


You can change the placement of the tooltip with Placement parameter:

HTML content

Use Html="true" to enable HTML in the tooltip.


You can use ShowAsync() and HideAsync() methods + OnShown and OnHidden events to program your own interaction.



Name Type Description
ChildContent RenderFragment Child content to wrap.
CssClass string Custom CSS class to add.
Html bool Allows you to insert HTML. If false, innerText property will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
Offset ValueTuple<int, int> Offset of the component relative to its target (ChildContent).
Placement TooltipPlacement Tooltip placement. Default is TooltipPlacement.Top.
Sanitize bool Enable or disable the sanitization. If activated HTML content will be sanitized. See the sanitizer section in Bootstrap JavaScript documentation.
Text string Tooltip text.
Trigger TooltipTrigger Tooltip trigger(s). Default is TooltipTrigger.Hover | TooltipTrigger.Focus.
WrapperCssClass string Custom CSS class to render with the span wrapper of the child-content.

Event callbacks

Name Type Description
OnHidden EventCallback Fired when the content has finished being hidden from the user and CSS transitions have completed.
OnShown EventCallback Fired when the content has been made visible to the user and CSS transitions have completed.


Method Returns Description
HideAsync() Task Hides the component.
ShowAsync() Task Shows the component.
An unhandled error has occurred. Reload 🗙