Tooltip

com.alecdorrington.laminarcomponents.Tooltip
object Tooltip

The page's one tooltip, for every hint in place of title, which opens late and cannot be styled. A single host at the root draws it, so that no ancestor can clip it. It opens at once on hover, keyboard focus or a tap, beside the line of its element nearest the pointer, in the element's language.

Drawn as .lc-tooltip ([data-side='below'] when below its element), its content in a .lc-tooltip-body, a plain hint a .lc-tooltip-text.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Tooltip.type

Members list

Type members

Classlikes

enum Side

A side a tooltip prefers, used while there is room there.

A side a tooltip prefers, used while there is room there.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply(hint: String): Modifier[L.HtmlElement]

Shows a hint, none if it is empty.

Shows a hint, none if it is empty.

Value parameters

hint

The hint.

Attributes

Returns

The modifier giving an element the hint.

def apply(hint: Signal[String]): Modifier[L.HtmlElement]

Shows a hint following a signal, none while it is empty.

Shows a hint following a signal, none while it is empty.

Value parameters

hint

The hint.

Attributes

Returns

The modifier giving an element the hint.

def closedOnInput: Modifier[L.HtmlElement]

The modifier closing the tooltip shown whenever its element takes input.

The modifier closing the tooltip shown whenever its element takes input.

Attributes

def host: L.HtmlElement

Renders the tooltip's host, mounted once at the root. Any press or Escape closes the tooltip.

Renders the tooltip's host, mounted once at the root. Any press or Escape closes the tooltip.

Attributes

Returns

The host.

def rich(content: => L.HtmlElement, side: Side = ...): Modifier[L.HtmlElement]

Shows content of any kind, on the side it prefers.

Shows content of any kind, on the side it prefers.

Value parameters

content

The content, built each time the tooltip opens.

side

The side preferred.

Attributes

Returns

The modifier giving an element the tooltip.

def whole(text: Signal[String]): Modifier[L.HtmlElement]

Shows the whole of a text only while the element cuts it short.

Shows the whole of a text only while the element cuts it short.

Value parameters

text

The element's whole text.

Attributes

Returns

The modifier giving an element the hint.