Package org.patternfly.component.popover


package org.patternfly.component.popover
Provides the PatternFly popover component and its subcomponents.

A popover is a floating content container that is triggered by a click (or hover) on a trigger element. It can display a header, body, and footer, and supports configurable placement relative to the trigger element. Popovers are typically used to provide more information or contextual actions.

Usage

 import org.jboss.elemento.By;
 import static org.patternfly.component.button.Button.button;
 import static org.patternfly.component.popover.Popover.popover;

 button("Toggle popover").primary()
         .id("popover-trigger");
 Popover popover = popover(By.id("popover-trigger"))
         .ariaLabel("Basic popover")
         .addHeader("Popover header")
         .addBody("Popovers are triggered by click rather than hover.")
         .addFooter("Popover footer");

A hoverable popover:

 import org.jboss.elemento.By;
 import static org.patternfly.component.popover.Popover.popover;

 Popover popover = popover(By.id("trigger-element"))
         .hoverable()
         .ariaLabel("Hoverable popover")
         .addHeader("Popover header")
         .addBody("This popover opens on hover.")
         .addFooter("Popover footer");
See Also: