templUI Pro coming soon  

50% OFF Join Waitlist

Popover

Displays rich content in a floating layer. Powered by Floating UI.

Source
TailwindCSS
Vanilla JS

Installation

  1. Install the component

    templui add popover
  2. Add the JavaScript to your layout

    @popover.Script()
    

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

Examples

Trigger & Closing

Positions

API Reference

Required parameter
Hover for description

Trigger

Element that triggers the popover when interacted with.

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

Content

Container for the popover content with positioning and behavior options.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
Placement
Placement
bottom
Offset
int
4 (or 8 with arrow)
DisableClickAway
bool
false
DisableESC
bool
false
ShowArrow
bool
false
HoverDelay
int
0
HoverOutDelay
int
0
MatchWidth
bool
false