Popover
Properties
Property | Type | Description |
---|---|---|
title | string | Title shown |
content | string[] | Content shown under title |
trigger | hover , focus , click | How the popover is opened by the user |
placement | string | Where the popover is located See Placement |
open | boolean | Weather the popover is opened Note |
defaultOpen | boolean | Weather the popover is opened by default |
arrow | boolean, table | See Arrow |
color | string | Color 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:

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
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
.
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 whentrue
it will start opened.
arrow
Default is false/undefined
.



color
Color of the popover.
color = "red"