The ASP.NET MVC Tooltip component is a pop-up that shows information or a message when users hover, click, focus, or touch an image, button, anchor tag, etc. The information displayed in the Tooltip can include simple text, images, hyperlinks, or custom templates.
The tooltip has twelve different options to position it around the target. Also, you can configure the Tooltip to follow or not follow the mouse. To position the tip pointer, there are four options: Right, left, top, and bottom.
The tooltip intelligently auto positions its content and arrows. It will fit in the best location of the view port or container.
You can load dynamic content for Tooltip on demand using an AJAX callback.
The tooltip shows and hides animations that are completely customizable. You can include animation effect, duration, and delay. You can also control transition effects at the application level.
Using templates, the tooltip content is loaded with inline HTML, images, iframe, videos, and maps. You can also add a title to the content.
You can control show and hide triggers of the tooltip using auto, hover, click, focus, and custom modes. Implement your own custom mode to control the show and hide behaviors.
Tooltip has options to customize offset position of the tooltip from the target element. This offset value is defined in pixels.
By default, the Tooltip will show and hide when hovering in and out. You can stop the show and hide triggers and make the Tooltip visible always.
You can show tooltips on hover, click, touch, and focus of any element.
You can completely customize the tooltip using CSS.
ASP.NET MVC Tooltip is shipped with several built-in themes such as material, bootstrap, fabric (office 365), and high contrast. Users can customize any one of these built-in themes or create new themes to achieve their own desired look and feel. It is achieved either by simply overriding SASS variables or using our Theme Studio application with ease.
You just need message and target element to make the tooltip fully functional. It will work out of the box. However, it provides many options to change the position, animation, and appearance.
The Tooltip responds to screen size and adapts its contents to fit any touch device. It recognizes touch gestures, displays the message when performing touch and hold action. It will hide after 1500ms. This provides the best user experience for touch devices such as phones, tablets, and desktops.
ASP.NET MVC Tooltip supports both SVG and canvas elements. Users can directly attach tooltips to <svg> or <canvas> elements to show data visualization elements.
The Tooltip component is also available in Blazor, React, Angular, JavaScript and Vue frameworks. Check out the different Tooltip platforms from the links below,
Fully supports WAI-ARIA accessibility to make it accessible to screen readers and assistive devices.
Based on the WCAG 2.0 standard, UI element visuals such as foreground color, background color, line spacing, text, and images are designed.
Follows WAI-ARIA best practices best practices for implementing keyboard interaction.
In Tooltip, you have control over all the UI elements and its behaviors. It provides the best user experience to users through a rich set of developer-friendly APIs.
Easily get started with the ASP.NET MVC Tooltip using a few simple lines of CSHTML example as demonstrated below. Also explore our ASP.NET MVC Tooltip Example that shows you how to render and configure a Tooltip in ASP.NET MVC.
@using Syncfusion.EJ2
@section ControlsSection{
<div class="col-lg-8 control-section">
<!-- Tooltip element -->
@Html.EJS().Tooltip("Tooltip").Content("Let's go green to save the planet!!").ContentTemplate(@<div>
<!-- Target element -->
@Html.EJS().Button("btn").Content("Show Tooltip").Render()
</div>).Render()
</div>
<div class="col-lg-4 property-section">
<table id="property" title="Properties">
<tbody>
<tr>
<td style="width: 30%">
<div>Position</div>
</td>
<td style="width: 70%;padding-right: 10px">
<div>
<select id="positions" class="form-control" onchange="onChange(this)">
<option value="TopLeft">Top Left</option>
<option value="TopCenter" selected="">Top Center</option>
<option value="TopRight">Top Right</option>
<option value="BottomLeft">Bottom Left</option>
<option value="BottomCenter">Bottom Center</option>
<option value="BottomRight">Bottom Right</option>
<option value="LeftTop">Left Top</option>
<option value="LeftCenter">Left Center</option>
<option value="LeftBottom">Left Bottom</option>
<option value="RightTop">Right Top</option>
<option value="RightCenter">Right Center</option>
<option value="RightBottom">Right Bottom</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
}
<script>
var tooltip;
window.onload = function () {
tooltip = document.getElementById('Tooltip').ej2_instances[0];
}
function onChange(args) {
tooltip.position = args.value;
}
</script>
<style>
#Tooltip {
position: absolute;
left: calc( 50% - 60px);
top: 45%;
}
#headerpanel {
padding-top: 30px;
padding-bottom: 20px;
font-weight: 600;
font-size: 15px;
}
</style>
You can find our ASP.NET MVC Tooltip demo here.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.