sketch/lustre/element

This module is a drop-in replacement for lustre/element. Just use the new functions, and everything will automagically be styled.

Types

Alias for lustre/element.Element.
Lustre Documentation

pub type Element(msg) =
  el.Element(msg)

Constants

pub const fragment: fn(List(Element(a))) -> Element(a)
pub const map: fn(Element(a), fn(a) -> b) -> Element(b)
pub const none: fn() -> Element(a)
pub const text: fn(String) -> Element(a)

Functions

pub fn class_name(class: Class) -> String

Generate a class name from a Class, using the StyleSheet injected in the environment.

pub fn element(
  tag tag: String,
  class class: Class,
  attributes attributes: List(Attribute(a)),
  children children: List(Element(a)),
) -> Element(a)
pub fn element_(
  tag tag: String,
  attributes attributes: List(Attribute(a)),
  children children: List(Element(a)),
) -> Element(a)
pub fn namespaced(
  tag tag: String,
  namespace namespace: String,
  class class: Class,
  attributes attributes: List(Attribute(a)),
  children children: List(Element(a)),
) -> Element(a)
pub fn namespaced_(
  tag tag: String,
  namespace namespace: String,
  attributes attributes: List(Attribute(a)),
  children children: List(Element(a)),
) -> Element(a)
Search Document