Tooltip

The Tooltip widget displays a tooltip for a specified element on the page.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/tooltip
Export: default

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the Tooltip widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
HTML
JavaScript
<div id="targetElement"></div>
<div id="tooltip">
    <p>Tooltip content</p>
</div>
$(function () {
    $("#tooltip").dxTooltip({
        target: '#targetElement',
        showEvent: 'dxhoverstart',
        hideEvent: 'dxhoverend'
    });
});
Angular
HTML
TypeScript
<div id="targetElement"></div>
<dx-tooltip
    target="#targetElement"
    showEvent="dxhoverstart"
    hideEvent="dxhoverend">
        <p>Tooltip content</p>
</dx-tooltip>
import { DxTooltipModule } from 'devextreme-angular'
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxTooltipModule
    ],
    // ...
})
AngularJS
HTML
<div id="targetElement"></div>
<div dx-tooltip="{
    target: '#targetElement',
    showEvent: 'dxhoverstart',
    hideEvent: 'dxhoverend'
}">
    <p>Tooltip content</p>
</div>
Knockout
HTML
<div id="targetElement"></div>
<div data-bind="dxTooltip: {
    target: '#targetElement',
    showEvent: 'dxhoverstart',
    hideEvent: 'dxhoverend'
}">
    <p>Tooltip content</p>
</div>
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().Tooltip()
    .ID("tooltip")
    .Target("#targetElement")
    .ShowEvent("dxhoverstart")
    .HideEvent("dxhoverend")
    .ContentTemplate(@<text>
        <p>Tooltip content</p>
    </text>)
)
<div id="targetElement"></div>
@Code
    Html.DevExtreme().Tooltip() _
        .ID("tooltip") _
        .Target("#targetElement") _
        .ShowEvent("dxhoverstart") _
        .HideEvent("dxhoverend") _
        .ContentTemplate(Sub()
            @<text>
                <p>Tooltip content</p>
            </text>
        End Sub).Render
End Code
<div id="targetElement"></div>

View Demo Watch Video

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Tooltip widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events fired by this widget.

See Also