lustre/attribute

To read the full documentation for this module, please visit https://lustre.build/api/lustre/attribute

Types

pub opaque type Attribute(msg)

Functions

pub fn accept(types: List(String)) -> Attribute(a)
pub fn accept_charset(types: List(String)) -> Attribute(a)
pub fn alt(text: String) -> Attribute(a)
pub fn attribute(name: String, value: String) -> Attribute(a)
pub fn autocomplete(name: String) -> Attribute(a)
pub fn autofocus(should_autofocus: Bool) -> Attribute(a)
pub fn autoplay(should_autoplay: Bool) -> Attribute(a)
pub fn checked(is_checked: Bool) -> Attribute(a)
pub fn class(name: String) -> Attribute(a)
pub fn classes(names: List(#(String, Bool))) -> Attribute(a)
pub fn cols(val: Int) -> Attribute(a)
pub fn controls(visible: Bool) -> Attribute(a)
pub fn disabled(is_disabled: Bool) -> Attribute(a)
pub fn download(filename: String) -> Attribute(a)
pub fn for(id: String) -> Attribute(a)
pub fn height(val: Int) -> Attribute(a)
pub fn href(uri: String) -> Attribute(a)
pub fn id(name: String) -> Attribute(a)
pub fn loop(should_loop: Bool) -> Attribute(a)
pub fn map(attr: Attribute(a), f: fn(a) -> b) -> Attribute(b)
pub fn max(val: String) -> Attribute(a)
pub fn min(val: String) -> Attribute(a)
pub fn msg(uri: String) -> Attribute(a)
pub fn name(name: String) -> Attribute(a)
pub fn none() -> Attribute(a)
pub fn on(
  name: String,
  handler: fn(Dynamic) -> Result(a, b),
) -> Attribute(a)
pub fn pattern(regex: String) -> Attribute(a)
pub fn placeholder(text: String) -> Attribute(a)
pub fn property(name: String, value: a) -> Attribute(b)
pub fn readonly(is_readonly: Bool) -> Attribute(a)
pub fn rel(relationship: String) -> Attribute(a)
pub fn required(is_required: Bool) -> Attribute(a)
pub fn role(name: String) -> Attribute(a)
pub fn rows(val: Int) -> Attribute(a)
pub fn selected(is_selected: Bool) -> Attribute(a)
pub fn src(uri: String) -> Attribute(a)
pub fn step(val: String) -> Attribute(a)
pub fn style(properties: List(#(String, String))) -> Attribute(a)
pub fn target(target: String) -> Attribute(a)
pub fn to_string(attr: Attribute(a)) -> String
pub fn to_string_builder(attr: Attribute(a)) -> StringBuilder
pub fn to_string_parts(
  attr: Attribute(a),
) -> Result(#(String, String), Nil)
pub fn type_(name: String) -> Attribute(a)
pub fn value(val: Dynamic) -> Attribute(a)
pub fn width(val: Int) -> Attribute(a)
pub fn wrap(mode: String) -> Attribute(a)
Search Document