overlays
Tailwind CSS Popover
Popovers provide contextual information and interactive features to enhance user interaction and understanding within an interface.
The popover component extends the functionality of the tooltip component by triggering upon click and enabling user interaction.
The example below demonstrates a default popover triggered upon a click event.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Use modifier class tooltip-{semantic-color}
with component class tooltip-body
for colored popover.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Utilize the JavaScript option class [--placement:{direction}]
to specify the popover placement in various directions. Here, direction
can be top
, bottom
, left
, or right
. By default, the popover is positioned at the top
.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Below given example shows rating & reviews popover on click.
All reviews are from genuine customers.
Use the JavaScript option class [--trigger:{event}]
to specify the event that opens the tooltip. The event options include hover
, focus
, or click
. By default, the tooltip/popover is triggered on the hover
event.
Utilize the provided example to trigger the tooltip/popover on the focus
event. Either use the Tab key to open it or click on it.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Click meUtilize the provided example to trigger the tooltip/popover on the Hover
event.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Click meUse the JavaScript option class [--interaction:{boolean}]
to enable interactivity within the tooltip/popover content. Setting it to false
will prevent interaction, causing the tooltip/popover to close upon clicking inside tooltip-content
. By default, its value is true
.
The provided example disables interaction with the popover content.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Use the JavaScript option class [--strategy:{position}]
to determine the placement strategy of the tooltip/popover. The position
parameter can be set to either fixed
or absolute
.
When set to absolute
, the tooltip/popover will be positioned relative to its parent element with the relative
class, thereby confining the popover/tooltip within that container. By default, the value is fixed
.
The provided example showcases the behavior of tooltips/popovers when utilizing the absolute positioning strategy.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.
Use the JavaScript option class [--prevent-popper:{boolean}]
to manage the placement calculation with Popper.
When set to true
, Popper will be prevented from calculating its position, resulting in the tooltip/popover remaining static and ceasing recalculation if there is insufficient space upon scrolling. By default, its value is false
.
The provided example showcases the behavior of tooltips/popovers when prevent-popper is set to true
.
This text serves as placeholder content for the popover, showcasing its overall look in the user interface.