ui/tooltip

Types

Messages for tooltip keyboard navigation

pub type Msg {
  Close
}

Constructors

  • Close
pub type Position {
  Top
  Bottom
  Left
  Right
}

Constructors

  • Top
  • Bottom
  • Left
  • Right
pub type Size {
  Small
  Medium
  Large
}

Constructors

  • Small
  • Medium
  • Large
pub type Variant {
  Default
  Muted
}

Constructors

  • Default
  • Muted

Values

pub fn aria_describedby(id: String) -> attribute.Attribute(a)
pub fn aria_label(label: String) -> attribute.Attribute(a)
pub fn content(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
pub fn keymap(key_event: keyboard.KeyEvent) -> option.Option(Msg)

Keymap for tooltip keyboard navigation

Keyboard interactions:

  • Escape: Close tooltip

Follows WAI-ARIA Tooltip pattern.

pub fn role_tooltip() -> attribute.Attribute(a)
pub fn size(s: Size) -> attribute.Attribute(a)
pub fn tooltip(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
  trigger: element.Element(a),
) -> element.Element(a)
pub fn trigger(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
Search Document