ui/toast

Types

Messages for toast keyboard navigation

pub type Msg {
  Dismiss
}

Constructors

  • Dismiss
pub type Size {
  Small
  Medium
  Large
}

Constructors

  • Small
  • Medium
  • Large
pub type Variant {
  Default
  Success
  Warning
  Error
}

Constructors

  • Default
  • Success
  • Warning
  • Error

Values

pub fn description(
  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 toast keyboard navigation

Keyboard interactions:

  • Escape: Dismiss toast

Follows WAI-ARIA Status Message pattern.

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