Tooltip¶
Note
A tooltip needs a layer to mount on. Without Layer, or a layer set with Layer.Provide or Layer.bind, it is created but never shown.
Tooltip shows a short label when the pointer is over an element. The tip is kept inside its layer, so it stays within a Window.
Usage¶
Call Components.Tooltip with a scope and a table of properties:
local save = C.IconButton(scope, { Name = "save" })
C.Tooltip(scope, {
Layer = overlayLayer,
Target = save,
Text = "Save",
Placement = "Auto",
})
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
ZIndex |
UsedAs<number> |
120 |
Z index of the component. | |
Text |
UsedAs<string> |
- | The label. | |
Target |
Instance |
- | The element that shows the tooltip when hovered. | |
Placement |
TooltipPlacement |
"Auto" |
Preferred side of the target. "Auto" picks the side with most room. |
|
Gap |
number |
8 |
Space between the target and the tooltip in pixels. |