Plugins You can find out about all the publicly available Grails plugins.

Tooltip Plugin

8 votes
compile "org.grails.plugins:tooltip:0.8"

 Documentation  Source  Issues


This plugin provides a lightweight and lightning fast tooltip that is very easy to use.


Add the following to your grails-app/conf/BuildConfig.groovy

grails.project.dependency.resolution = {
  plugins {
    compile ':tooltip:0.8'


Set default CSS

As of version 0.7 it is possible to change the default CSS file by adding the following line into the application configuration file.


In this example the application then will reference to a CSS file with the path: css/tooltip/myTooltipStyles.css

Include resources

To include all needed resources to your page simply put the following line into the GSPs html header.


When you want to use your own stylesheet add the attribute stylesheet .

<tooltip:resources stylesheet="myTooltipStyles"/>

Note that there is no .css file ending. The root path to the stylesheet path is <app-home>/web-app/css/tooltip

Apply tooltip

You have to surround a text or element with the <tooltip:tip> tag to bring up the tooltip. Have a look at the following example.

<tooltip:tip value="some tooltip text">
    element that shows the tooltip

Since version 0.2 there is a better i18n support. Just use the code attribute instead of the value attribute. In the next example the tip-tag will invoke the g.message(code:'some.code') method internally.

<tooltip:tip code="some.code">
    element that shows the tooltip

You can also apply a tooltip with the plain javascript that is generated by the tip-tag. Just have a look at the following example.

<tr onmouseover="'some tooltip text');" onmouseout="tooltip.hide();">


05 Oct 2013, Version 0.8 - Upgrade to Grails 2.0. code or value attribute nomore mandatory.
05 Mar 2012, Version 0.7 - Grails 2.0 compatibility check. Default tooltip CSS configurable.
16 Mar 2010, Version 0.6 - Grails upgrade
13 Dec 2009, Version 0.5 - Licence changed to Apache 2.0, Grails upgrade
01 Jun 2009, Version 0.4 - Grails upgrade
29 Mar 2009, Version 0.3 - Bugfix, Custom stylesheets
08 Mar 2009, Version 0.2 - I18n support
01 Mar 2009, Version 0.1 - Initial release