Ship faster with goilerplate templUI Pro

Tooltip

Small pop-up that appears on hover. Powered by Popover with Floating UI.

Source Tailwind CSS JavaScript

Installation

  1. Install the component

    templui add tooltip
  2. Add the JavaScript to your layout

    @popover.Script()
    

    Call this template in your base layout file (e.g., in the <head> section).

Examples

Positions

API Reference

Required parameter
Hover for description

Tooltip

Root wrapper component for tooltip functionality.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-

Trigger

Element that triggers the tooltip on hover.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
For
string
-

Content

Container for the tooltip content with positioning options.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
ShowArrow
bool
false
Position
Position
top
HoverDelay
int
0
HoverOutDelay
int
0