tooltip

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TooltipFixtures = gx.Fixtures[TooltipProps]{
	"Top":    {Content: "Add to library", Children: gx.El("button", gx.Attrs{{Key: "type", Value: "button"}}, gx.Text("Hover me"))},
	"Right":  {Content: "Add to library", Side: Right, Children: gx.El("button", gx.Attrs{{Key: "type", Value: "button"}}, gx.Text("Hover me"))},
	"Bottom": {Content: "Add to library", Side: Bottom, Children: gx.El("button", gx.Attrs{{Key: "type", Value: "button"}}, gx.Text("Hover me"))},
	"Left":   {Content: "Add to library", Side: Left, Children: gx.El("button", gx.Attrs{{Key: "type", Value: "button"}}, gx.Text("Hover me"))},
}

Functions

func Tooltip

func Tooltip(p TooltipProps) gx.Node

Types

type Side

type Side string

Side is the edge a tooltip appears on.

const (
	Top    Side = "top"
	Bottom Side = "bottom"
	Left   Side = "left"
	Right  Side = "right"
)

The sides of tooltip.Tooltip.

type TooltipProps

type TooltipProps struct {
	// Content is the text of the tooltip. An empty value renders no tooltip.
	Content string
	// Side sets the edge of the trigger that the tooltip appears on: Top, Bottom, Left or Right.
	Side Side
	// Class adds classes to the root element.
	Class string
	// Children is the element that shows the tooltip on hover or on keyboard focus.
	Children gx.Node
	// Attrs adds HTML attributes to the root element.
	Attrs gx.Attrs
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL