framework/front/el

Types

pub type Element(message) =
  element.Element(message)

Values

pub fn badge(
  count: option.Option(Int),
  child: List(element.Element(message)),
) -> element.Element(message)

A badge marker whose optional count is always represented by one element.

pub fn closer(
  area: String,
  child: List(element.Element(message)),
) -> element.Element(message)

A button that closes the overlay belonging to area.

pub fn each(
  items: List(item),
  view: fn(item) -> element.Element(message),
) -> element.Element(message)
pub fn each_modal(
  scope: String,
  row_key: String,
  opener_child: List(element.Element(message)),
  closer_child: List(element.Element(message)),
  child: List(element.Element(message)),
) -> element.Element(message)

A popover and its controls for one row rendered inside each.

scope identifies the each call site and row_key identifies one row within that scope. A generator should provide stable, distinct tokens for both. The id format is yumemi-row-overlay-{scope length}-{scope}-{key length}-{key}. The length fields make the pair unambiguous. The id is constructed here, so callers provide neither an id nor an id attribute.

pub fn img(
  class: css.Class,
  attributes: List(attribute.Attribute(message)),
) -> element.Element(message)
pub fn island(
  component: String,
  attributes: List(attribute.Attribute(message)),
) -> element.Element(message)
pub fn opener(
  area: String,
  child: List(element.Element(message)),
) -> element.Element(message)

A button that opens the overlay belonging to area.

pub const overlay_id_prefix: String

Prefix for area overlay ids. Append the exact area name to form the id.

pub const text: fn(String) -> element.Element(a)
✨ Search Document