Skip to content

Popover

A floating panel that appears when the user clicks a wrapped component. Unlike a Tooltip, a Popover can contain rich content.

Popover.builder()
.wrapped(new Text("Click me!"))
.content(new Text("Popover content goes here."))
.build()
PropertyTypeDefaultDescription
contentComponentRich content shown in the floating panel
wrappedComponentThe element that triggers the popover on click
styleStringInline CSS
cssClassesStringCSS class names
// Popover with structured content
Popover.builder()
.wrapped(new Badge("?"))
.content(VerticalLayout.builder()
.spacing(true)
.content(List.of(
new Text("Why is this field required?", TextContainer.strong),
new Text("This value is used to calculate VAT. Without it, the invoice cannot be generated.")
))
.build())
.build()
// Image in a popover
Popover.builder()
.wrapped(new Text("Preview"))
.content(new Image("https://example.com/preview.png"))
.build()

Use Popover when you need a click-triggered overlay with rich content (images, lists, formatted text). Use Tooltip for simple hover hints.