Tooltip
The hover label: inverted chrome, a rest delay, pass-through events.
Wrap any widget; hold the pointer for a beat and the label floats in beneath it on the portal layer. The hover area passes events through — the child keeps its own interactions. One Tooltip struct per wrapped instance.
Installation
Use the module import (the default), or own the source: lotusui add
vendors the component into your app and lotusui update keeps the copy mergeable —
see Registry.
go get github.com/ikaito-com/lotusui
# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add tooltip
Usage
var tip lotusui.Tooltip
tip.Layout(th, gtx, "Add to library",
lotusui.Button(th, &btn, "Hover me", lotusui.ButtonOpts{Variant: lotusui.ButtonOutline}))
Sides
Side floats the label above, below, or beside the child.
tip := lotusui.Tooltip{Side: lotusui.TooltipTop}
API
| Option | Type | Description |
|---|---|---|
Layout(th, gtx, text, child) | method | Wrap any widget; label floats in after a rest delay. |