Skip to main content

Popover

Properties

PropertyTypeDescription
titlestringTitle shown
contentstring[]Content shown under title
triggerhover, focus, clickHow the popover is opened by the user
placementstringWhere the popover is located See Placement
openbooleanWeather the popover is opened Note
defaultOpenbooleanWeather the popover is opened by default
arrowboolean, tableSee Arrow
colorstringColor of the popover
All properties are optional!

You can see more options here.

Children

Popover has to have children, it is the children (when hovered) that displays the popover.

Example

local a = AM:createElement("Popover", {
title = "Title",
content = {
"Line 1",
"Line 2",
},
onOpenChange = function(id, name, open)
print("Popover: ", open)
end,
}, {
AM:createElement("Button", {
text = "Hover Me"
}),
})

How it looks:

Showcase

title

The title displayed for the popover, is bigger in size and has bold font.

content

Text displayed in the popover, entries have to be strings (for now) and each entry is a new line.

trigger

Can be hover, focus or click

When hover the popover is displayed when a child is hovered.

When focus the popover is displayed when a child is focused.

When click the popover is displayed when a child is clicked.

placement

Can be any of the following: top, left, right, bottom, topLeft, topRight, bottomLeft, bottomRight, leftTop, leftBottom, rightTop or rightBottom.

Changes the position of the popover.

open

Use if you want to overwrite how the popover is opened/closed.

When set the popover will not open or close by itself.

defaultOpen

Weather the popover should be opened by default/when initialized.

So when true it will start opened.

arrow

Default is false/undefined.

1

2

3

color

Color of the popover.

color = "red"

color