Overlays

Popover

Popovers provide contextual information and interactive features to enhance user interaction and understanding within an interface.

Default

Basic example

The popover component extends the functionality of the tooltip component by triggering upon click and enabling user interaction.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Colors

Semantic variants

Use modifier class `tooltip-{semantic-color}` with component class `tooltip-body` for colored popover.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Directions

Popover placements

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`.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Illustrations

Ratings & reviews

Below given example shows rating & reviews popover on click.

Ratings & reviews

4.35
Total 300 reviews

All reviews are from genuine customers.

+6 this week See all
5 Star
225
4 Star
30
3 Star
30
2 Star
15
1 Star
00

Options usage

Trigger — On Click

Use the JavaScript option class `[--trigger:{event}]` to specify the event that opens the tooltip. The event options include `hover`, or `click`. By default, the tooltip/popover is triggered on the `hover` event.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Click me

Trigger — On Hover

Utilize the provided example to trigger the tooltip/popover on the `Hover` event.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Click me

Interaction

To enable interactivity within the tooltip or popover content, use the JavaScript option class `[--interaction:{boolean}]`. Setting this option to `true` enable interaction, causing the tooltip or popover to remain open when clicking inside `tooltip-content`. By default, it is set to `false`. Note that this class selector works exclusively with `[--trigger:click]`.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Click me

Tooltip strategy

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`.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Prevent popper

Use the JavaScript option class `[--prevent-popper:{boolean}]` to manage the placement calculation with Popper.

Popover title

This text serves as placeholder content for the popover, showcasing its overall look in the user interface.

Class referenceThe component, style, color, state, size and modifier classes available for this component.
ClassTypeDescription
tooltipcomponentBase class for popover component.
tooltip-togglepartBase class for toggling the display of popover.
tooltip-contentpartPlaces for popover content with popper.
tooltip-bodypartContainer for popover content.
tooltip-primarycolorPopover with 'primary' color.
tooltip-secondarycolorPopover with 'secondary' color.
tooltip-accentcolorPopover with 'accent' color.
tooltip-infocolorPopover with 'info' color.
tooltip-successcolorPopover with 'success' color.
tooltip-warningcolorPopover with 'warning' color.
tooltip-errorcolorPopover with 'error' color.
tooltip-shown:{tw-utility-class}variantAdds specific tailwind classes when the popover is open.