Tooltip
Overview¶
Tooltip is based on the Angular Material tooltip component.
Examples¶
import mesop as me
def load(e: me.LoadEvent):
me.set_theme_mode("system")
@me.page(
on_load=load,
security_policy=me.SecurityPolicy(
allowed_iframe_parents=["https://google.github.io"]
),
path="/tooltip",
)
def app():
with me.box(style=me.Style(margin=me.Margin.all(15))):
with me.tooltip(message="Tooltip message"):
me.text(text="Hello, World")
API¶
tooltip
¶
Creates a Tooltip component. Tooltip is a composite component.
PARAMETER | DESCRIPTION |
---|---|
key |
The component key.
TYPE:
|
position |
Allows the user to define the position of the tooltip relative to the parent element
TYPE:
|
position_at_origin |
Whether tooltip should be relative to the click or touch origin instead of outside the element bounding box.
TYPE:
|
disabled |
Disables the display of the tooltip.
TYPE:
|
show_delay_ms |
The default delay in ms before showing the tooltip after show is called
TYPE:
|
hide_delay_ms |
The default delay in ms before hiding the tooltip after hide is called
TYPE:
|
message |
The message to be displayed in the tooltip
TYPE:
|