#HTML

The html package provides wrapper functions for all HTML elements. Basic usage:

///|
fn view(emit : Emit[Msg], model : Model) -> Html {
div(id="counter", style=["border: 1px solid black"], [
h1(id="title", "the count is \{model.count}"),
button(class="...", on_click=emit(Inc), "+"),
button(class="...", on_click=emit(Dec), "-"),
])
}

Frequently used attributes are exposed as optional arguments. To access any HTML attribute, see Attribute Builder. Most HTML wrappers accept a positional argument whose type is constrained by IsChildren, so you can pass an Array[Html] or a String. See Children for details.

There are also a few special helpers you will use frequently:

  • text()

    To represent text in HTML, use the text function.

    ///|
    let _ = p([text("hello world")])
    let _ = p("hello world") // equivalent to above

  • nothing

    It does not represent an actual HTML element. This is useful when handling multiple Option values in your model:

    ///|
    fn bad(path : Path, tag : Tag?) {
    let path = foo(path)
    let tag = match tag {
    None => []
    Some(x) => [view(x)] // Yuck!
    }
    div([path] + tag) // Don't do this
    }

    ///|
    fn good(path : Path, tag : Tag?) {
    let path = foo(path)
    let tag = match tag {
    None => nothing
    Some(x) => view(x)
    }
    div([path, tag]) // Use @html.nothing
    }

#Children

Almost every HTML element accepts a positional argument whose type is bounded by the IsChildren trait. This means you can pass any type that implements this trait as children to the HTML wrapper.

Currently it accepts the following types:

typeexample
Array[Html]div([html1, html2])
Stringdiv("string here")
Htmldiv(p([...]))
Map[String,Html]div({"k1": html1, "k2": html2})

#Keyed Children

When children are passed as Map[String, Html], Rabbita treats them as keyed children. Keys are used to match and reuse nodes across updates, which helps preserve DOM and Cell state when items are inserted, removed, or reordered.

  • Keys must be unique and stable (use a business ID, not an array index).
  • Changing a key means the old node is removed and a new one is created.

Example:

///|
let html : Html = ul({
"todo-1": li("Buy milk"),
"todo-2": li("Write docs"),
"todo-3": li("Write code"),
})

#Event Handlers

Rabbita separates event callbacks from UI views to manage side effects and avoid stale state, keeping UI predictable as code grows.

HTML wrappers provide common events as optional arguments like on_click, on_mouseup, on_scroll, and on_submit. Each requires a Cmd binding to a Msg you define. When an event fires, the Msg (and any extra payload) is forwarded to the centralized state update function.

Registering the same event more than once composes the handlers in registration order. When a wrapper receives both an event in attrs and its matching named event argument, the attrs handler runs first and the named handler runs second. Non-event attributes and properties keep their usual last-write-wins behavior.

Example:

///|
#cfg(target="js")
fn update2(msg : Msg2, _ : Model2) -> Model2 {
match msg {
StartDraw(mouse) => println("start at \{mouse.offset_pos()}")
EndDraw(mouse) => println("end at \{mouse.offset_pos()}")
}
}

///|
fn view2(emit : Emit[Msg2], _ : Model2) -> Html {
canvas(
on_mousedown=m => emit(StartDraw(m)),
on_mouseup=m => emit(EndDraw(m)),
nothing,
)
}

#Advanced Usage

#Attribute Builder

The attribute builder is a workaround for cases where the HTML wrapper does not expose a specific attribute or event. It is not the primary API and may be less ergonomic or less type-safe than the dedicated wrapper parameters. Prefer the wrapper options when available, and fall back to the builder only when needed.

Example:

///|
let html1 : Html = div(
attrs=Attrs::build().class("card").style("gap", "12px").data("..."),
[text("Hello")],
)

#Escape Hatch

The wrapper functions and properties provided here may not cover all possible use cases. If you encounter missing functionality, feel free to file an issue or use the node() function as a workaround. The node() function allows you to manually specify the tag name, attributes, and children for your HTML element, offering flexibility for advanced or uncommon scenarios.

///|
let html2 : Html = node(
"div",
Attrs::build().class("card").style("gap", "12px").data("..."),
[p("text1"), p("text2")],
)

Attrs

type Attrs

Attrs::abbr

fn Attrs::abbr(self : Attrs, value : String) -> Attrs

Attrs::accept

fn Attrs::accept(self : Attrs, value : String) -> Attrs

Attrs::accept_charset

fn Attrs::accept_charset(self : Attrs, value : String) -> Attrs

Attrs::accesskey

fn Attrs::accesskey(self : Attrs, value : String) -> Attrs

Attrs::action

fn Attrs::action(self : Attrs, value : String) -> Attrs

Attrs::align

fn Attrs::align(self : Attrs, value : String) -> Attrs

Attrs::allow

fn Attrs::allow(self : Attrs, value : String) -> Attrs

Attrs::allowfullscreen

fn Attrs::allowfullscreen(self : Attrs, value : Bool) -> Attrs

Attrs::alpha

fn Attrs::alpha(self : Attrs, value : String) -> Attrs

Attrs::alt

fn Attrs::alt(self : Attrs, value : String) -> Attrs

Attrs::anchor

fn Attrs::anchor(self : Attrs, value : String) -> Attrs

Attrs::aria_activedescendant

fn Attrs::aria_activedescendant(self : Attrs, value : String) -> Attrs

Attrs::aria_atomic

fn Attrs::aria_atomic(self : Attrs, value : String) -> Attrs

Attrs::aria_autocomplete

fn Attrs::aria_autocomplete(self : Attrs, value : String) -> Attrs

Attrs::aria_braillelabel

fn Attrs::aria_braillelabel(self : Attrs, value : String) -> Attrs

Attrs::aria_brailleroledescription

fn Attrs::aria_brailleroledescription(self : Attrs, value : String) -> Attrs

Attrs::aria_busy

fn Attrs::aria_busy(self : Attrs, value : String) -> Attrs

Attrs::aria_checked

fn Attrs::aria_checked(self : Attrs, value : String) -> Attrs

Attrs::aria_colcount

fn Attrs::aria_colcount(self : Attrs, value : String) -> Attrs

Attrs::aria_colindex

fn Attrs::aria_colindex(self : Attrs, value : String) -> Attrs

Attrs::aria_colindextext

fn Attrs::aria_colindextext(self : Attrs, value : String) -> Attrs

Attrs::aria_colspan

fn Attrs::aria_colspan(self : Attrs, value : String) -> Attrs

Attrs::aria_controls

fn Attrs::aria_controls(self : Attrs, value : String) -> Attrs

Attrs::aria_current

fn Attrs::aria_current(self : Attrs, value : String) -> Attrs

Attrs::aria_describedby

fn Attrs::aria_describedby(self : Attrs, value : String) -> Attrs

Attrs::aria_description

fn Attrs::aria_description(self : Attrs, value : String) -> Attrs

Attrs::aria_details

fn Attrs::aria_details(self : Attrs, value : String) -> Attrs

Attrs::aria_disabled

fn Attrs::aria_disabled(self : Attrs, value : String) -> Attrs

Attrs::aria_dropeffect

fn Attrs::aria_dropeffect(self : Attrs, value : String) -> Attrs

Attrs::aria_errormessage

fn Attrs::aria_errormessage(self : Attrs, value : String) -> Attrs

Attrs::aria_expanded

fn Attrs::aria_expanded(self : Attrs, value : String) -> Attrs

Attrs::aria_flowto

fn Attrs::aria_flowto(self : Attrs, value : String) -> Attrs

Attrs::aria_grabbed

fn Attrs::aria_grabbed(self : Attrs, value : String) -> Attrs

Attrs::aria_haspopup

fn Attrs::aria_haspopup(self : Attrs, value : String) -> Attrs

Attrs::aria_hidden

fn Attrs::aria_hidden(self : Attrs, value : String) -> Attrs

Attrs::aria_invalid

fn Attrs::aria_invalid(self : Attrs, value : String) -> Attrs

Attrs::aria_keyshortcuts

fn Attrs::aria_keyshortcuts(self : Attrs, value : String) -> Attrs

Attrs::aria_label

fn Attrs::aria_label(self : Attrs, value : String) -> Attrs

Attrs::aria_labelledby

fn Attrs::aria_labelledby(self : Attrs, value : String) -> Attrs

Attrs::aria_level

fn Attrs::aria_level(self : Attrs, value : String) -> Attrs

Attrs::aria_live

fn Attrs::aria_live(self : Attrs, value : String) -> Attrs

Attrs::aria_modal

fn Attrs::aria_modal(self : Attrs, value : String) -> Attrs

Attrs::aria_multiline

fn Attrs::aria_multiline(self : Attrs, value : String) -> Attrs

Attrs::aria_multiselectable

fn Attrs::aria_multiselectable(self : Attrs, value : String) -> Attrs

Attrs::aria_orientation

fn Attrs::aria_orientation(self : Attrs, value : String) -> Attrs

Attrs::aria_owns

fn Attrs::aria_owns(self : Attrs, value : String) -> Attrs

Attrs::aria_placeholder

fn Attrs::aria_placeholder(self : Attrs, value : String) -> Attrs

Attrs::aria_posinset

fn Attrs::aria_posinset(self : Attrs, value : String) -> Attrs

Attrs::aria_pressed

fn Attrs::aria_pressed(self : Attrs, value : String) -> Attrs

Attrs::aria_readonly

fn Attrs::aria_readonly(self : Attrs, value : String) -> Attrs

Attrs::aria_relevant

fn Attrs::aria_relevant(self : Attrs, value : String) -> Attrs

Attrs::aria_required

fn Attrs::aria_required(self : Attrs, value : String) -> Attrs

Attrs::aria_roledescription

fn Attrs::aria_roledescription(self : Attrs, value : String) -> Attrs

Attrs::aria_rowcount

fn Attrs::aria_rowcount(self : Attrs, value : String) -> Attrs

Attrs::aria_rowindex

fn Attrs::aria_rowindex(self : Attrs, value : String) -> Attrs

Attrs::aria_rowindextext

fn Attrs::aria_rowindextext(self : Attrs, value : String) -> Attrs

Attrs::aria_rowspan

fn Attrs::aria_rowspan(self : Attrs, value : String) -> Attrs

Attrs::aria_selected

fn Attrs::aria_selected(self : Attrs, value : String) -> Attrs

Attrs::aria_setsize

fn Attrs::aria_setsize(self : Attrs, value : String) -> Attrs

Attrs::aria_sort

fn Attrs::aria_sort(self : Attrs, value : String) -> Attrs

Attrs::aria_valuemax

fn Attrs::aria_valuemax(self : Attrs, value : String) -> Attrs

Attrs::aria_valuemin

fn Attrs::aria_valuemin(self : Attrs, value : String) -> Attrs

Attrs::aria_valuenow

fn Attrs::aria_valuenow(self : Attrs, value : String) -> Attrs

Attrs::aria_valuetext

fn Attrs::aria_valuetext(self : Attrs, value : String) -> Attrs

Attrs::as_

fn Attrs::as_(self : Attrs, value : String) -> Attrs

Attrs::async_

fn Attrs::async_(self : Attrs, value : Bool) -> Attrs

Attrs::autocapitalize

fn Attrs::autocapitalize(self : Attrs, value : String) -> Attrs

Attrs::autocomplete

fn Attrs::autocomplete(self : Attrs, value : AutoComplete) -> Attrs

Attrs::autocorrect

fn Attrs::autocorrect(self : Attrs, value : String) -> Attrs

Attrs::autofocus

fn Attrs::autofocus(self : Attrs, value : Bool) -> Attrs

Attrs::autoplay

fn Attrs::autoplay(self : Attrs, value : Bool) -> Attrs

Attrs::background

fn Attrs::background(self : Attrs, value : String) -> Attrs

Attrs::bgcolor

fn Attrs::bgcolor(self : Attrs, value : String) -> Attrs

Attrs::border

fn Attrs::border(self : Attrs, value : Int) -> Attrs

Attrs::build

fn Attrs::build() -> Attrs

Attrs::capture

fn Attrs::capture(self : Attrs, value : String) -> Attrs

Attrs::charset

fn Attrs::charset(self : Attrs, value : String) -> Attrs

Attrs::checked

fn Attrs::checked(self : Attrs, value : Bool) -> Attrs

Attrs::cite

fn Attrs::cite(self : Attrs, value : String) -> Attrs

Attrs::class

fn Attrs::class(self : Attrs, value : String) -> Attrs

Attrs::closedby

fn Attrs::closedby(self : Attrs, value : String) -> Attrs

Set the dialog closedby attribute.

Browser support is limited. Rabbita only emits the attribute; it does not polyfill dismissal behavior. Values include "none", "closerequest", and "any". MDN

Attrs::color

fn Attrs::color(self : Attrs, value : String) -> Attrs

Attrs::colorspace

fn Attrs::colorspace(self : Attrs, value : String) -> Attrs

Attrs::cols

fn Attrs::cols(self : Attrs, value : Int) -> Attrs

Attrs::colspan

fn Attrs::colspan(self : Attrs, value : Int) -> Attrs

Attrs::content

fn Attrs::content(self : Attrs, value : String) -> Attrs

Attrs::contenteditable

fn Attrs::contenteditable(self : Attrs, value : String) -> Attrs

Attrs::controls

fn Attrs::controls(self : Attrs, value : Bool) -> Attrs

Attrs::coords

fn Attrs::coords(self : Attrs, value : String) -> Attrs

Attrs::copy

fn Attrs::copy(self : Attrs) -> Attrs

Return an independent copy that can be extended without mutating self.

Attrs::crossorigin

fn Attrs::crossorigin(self : Attrs, value : String) -> Attrs

Attrs::csp

fn Attrs::csp(self : Attrs, value : String) -> Attrs

Attrs::data

fn Attrs::data(self : Attrs, value : String) -> Attrs

Attrs::data_set

fn Attrs::data_set(self : Attrs, name : String, value : String) -> Attrs

Attrs::datetime

fn Attrs::datetime(self : Attrs, value : String) -> Attrs

Attrs::decoding

fn Attrs::decoding(self : Attrs, value : String) -> Attrs

Attrs::default

fn Attrs::default(self : Attrs, value : Bool) -> Attrs

Attrs::defer_

fn Attrs::defer_(self : Attrs, value : Bool) -> Attrs

Attrs::dir

fn Attrs::dir(self : Attrs, value : String) -> Attrs

Attrs::dirname

fn Attrs::dirname(self : Attrs, value : String) -> Attrs

Attrs::disabled

fn Attrs::disabled(self : Attrs, value : Bool) -> Attrs

Attrs::download

fn Attrs::download(self : Attrs, value : String) -> Attrs

Attrs::draggable

fn Attrs::draggable(self : Attrs, value : String) -> Attrs

Attrs::elementtiming

fn Attrs::elementtiming(self : Attrs, value : String) -> Attrs

Attrs::enctype

fn Attrs::enctype(self : Attrs, value : String) -> Attrs

Attrs::enterkeyhint

fn Attrs::enterkeyhint(self : Attrs, value : String) -> Attrs

Attrs::exportparts

fn Attrs::exportparts(self : Attrs, value : String) -> Attrs

Attrs::fetchpriority

fn Attrs::fetchpriority(self : Attrs, value : String) -> Attrs

Attrs::for_

fn Attrs::for_(self : Attrs, value : String) -> Attrs

Attrs::form

fn Attrs::form(self : Attrs, value : String) -> Attrs

Attrs::formaction

fn Attrs::formaction(self : Attrs, value : String) -> Attrs

Attrs::formenctype

fn Attrs::formenctype(self : Attrs, value : String) -> Attrs

Attrs::formmethod

fn Attrs::formmethod(self : Attrs, value : String) -> Attrs

Attrs::formnovalidate

fn Attrs::formnovalidate(self : Attrs, value : Bool) -> Attrs

Attrs::formtarget

fn Attrs::formtarget(self : Attrs, value : String) -> Attrs

Attrs::headers

fn Attrs::headers(self : Attrs, value : String) -> Attrs

Attrs::height

fn Attrs::height(self : Attrs, value : Int) -> Attrs

Attrs::hidden

fn Attrs::hidden(self : Attrs, value : Bool) -> Attrs

Attrs::high

fn Attrs::high(self : Attrs, value : Int) -> Attrs

Attrs::href

fn Attrs::href(self : Attrs, value : String) -> Attrs

Attrs::hreflang

fn Attrs::hreflang(self : Attrs, value : String) -> Attrs

Attrs::http_equiv

fn Attrs::http_equiv(self : Attrs, value : String) -> Attrs

Attrs::id

fn Attrs::id(self : Attrs, value : String) -> Attrs

Attrs::inert

fn Attrs::inert(self : Attrs, value : Bool) -> Attrs

Attrs::inner_html

#internal(xss_vulnerable, "This function may cause xss attack.")
fn Attrs::inner_html(self : Attrs, html : String) -> Attrs

Sets raw HTML and bypasses normal escaping.

Vulnerability Warning

This is XSS‑prone and should only be used with trusted or sanitized input. It affects both HTML and SVG content since the browser will parse the string into DOM nodes.

Attrs::inputmode

fn Attrs::inputmode(self : Attrs, value : String) -> Attrs

Attrs::integrity

fn Attrs::integrity(self : Attrs, value : String) -> Attrs

Attrs::is_

fn Attrs::is_(self : Attrs, value : String) -> Attrs

Attrs::ismap

fn Attrs::ismap(self : Attrs, value : Bool) -> Attrs

Attrs::itemid

fn Attrs::itemid(self : Attrs, value : String) -> Attrs

Attrs::itemprop

fn Attrs::itemprop(self : Attrs, value : String) -> Attrs

Attrs::itemref

fn Attrs::itemref(self : Attrs, value : String) -> Attrs

Attrs::itemscope

fn Attrs::itemscope(self : Attrs, value : Bool) -> Attrs

Attrs::itemtype

fn Attrs::itemtype(self : Attrs, value : String) -> Attrs

Attrs::kind

fn Attrs::kind(self : Attrs, value : String) -> Attrs

Attrs::label

fn Attrs::label(self : Attrs, value : String) -> Attrs

Attrs::lang

fn Attrs::lang(self : Attrs, value : String) -> Attrs

Attrs::language

fn Attrs::language(self : Attrs, value : String) -> Attrs

Attrs::list

fn Attrs::list(self : Attrs, value : String) -> Attrs

Attrs::loading

fn Attrs::loading(self : Attrs, value : String) -> Attrs

Attrs::loop_

fn Attrs::loop_(self : Attrs, value : Bool) -> Attrs

Attrs::low

fn Attrs::low(self : Attrs, value : Int) -> Attrs

Attrs::max

fn Attrs::max(self : Attrs, value : Int) -> Attrs

Attrs::maxlength

fn Attrs::maxlength(self : Attrs, value : Int) -> Attrs

Attrs::media

fn Attrs::media(self : Attrs, value : String) -> Attrs

Attrs::method_

fn Attrs::method_(self : Attrs, value : String) -> Attrs

Attrs::min

fn Attrs::min(self : Attrs, value : Int) -> Attrs

Attrs::minlength

fn Attrs::minlength(self : Attrs, value : Int) -> Attrs

Attrs::multiple

fn Attrs::multiple(self : Attrs, value : Bool) -> Attrs

Attrs::muted

fn Attrs::muted(self : Attrs, value : Bool) -> Attrs

Attrs::name

fn Attrs::name(self : Attrs, value : String) -> Attrs

Attrs::nonce

fn Attrs::nonce(self : Attrs, value : String) -> Attrs

Attrs::novalidate

fn Attrs::novalidate(self : Attrs, value : Bool) -> Attrs

Attrs::on_beforeinput

fn Attrs::on_beforeinput(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_blur

fn Attrs::on_blur(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_change

fn Attrs::on_change(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_click

fn Attrs::on_click(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_compositionend

fn Attrs::on_compositionend(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_compositionstart

fn Attrs::on_compositionstart(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_compositionupdate

fn Attrs::on_compositionupdate(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_contextmenu

fn Attrs::on_contextmenu(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_copy

fn Attrs::on_copy(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_cut

fn Attrs::on_cut(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dbclick

fn Attrs::on_dbclick(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dblclick

fn Attrs::on_dblclick(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dragend

fn Attrs::on_dragend(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dragenter

fn Attrs::on_dragenter(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dragleave

fn Attrs::on_dragleave(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dragover

fn Attrs::on_dragover(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_dragstart

fn Attrs::on_dragstart(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_drop

fn Attrs::on_drop(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_focus

fn Attrs::on_focus(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_input

fn Attrs::on_input(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_keydown

fn Attrs::on_keydown(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_keyup

fn Attrs::on_keyup(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mousedown

fn Attrs::on_mousedown(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mouseenter

fn Attrs::on_mouseenter(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mouseleave

fn Attrs::on_mouseleave(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mousemove

fn Attrs::on_mousemove(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mouseout

fn Attrs::on_mouseout(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mouseover

fn Attrs::on_mouseover(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_mouseup

fn Attrs::on_mouseup(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_paste

fn Attrs::on_paste(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_pointercancel

fn Attrs::on_pointercancel(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Handle browser cancellation of an active pointer interaction.

Attrs::on_pointerdown

fn Attrs::on_pointerdown(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Handle a primary or auxiliary pointer starting contact with the element.

PointerEvent extends the browser's mouse-event surface, so the callback uses Rabbita's existing MouseEvent wrapper while preserving pointer-only fields for JavaScript FFI helpers.

Attrs::on_pointermove

fn Attrs::on_pointermove(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Handle movement from a captured mouse, pen, or touch pointer.

Attrs::on_pointerup

fn Attrs::on_pointerup(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Handle the end of a mouse, pen, or touch pointer interaction.

Attrs::on_reset

fn Attrs::on_reset(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_scroll

fn Attrs::on_scroll(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_submit

fn Attrs::on_submit(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::on_wheel

fn Attrs::on_wheel(self : Attrs, msg : (Unit) ->
Cmd
) -> Attrs

Attrs::open

fn Attrs::open(self : Attrs, value : Bool) -> Attrs

Attrs::optimum

fn Attrs::optimum(self : Attrs, value : Int) -> Attrs

Attrs::part

fn Attrs::part(self : Attrs, value : String) -> Attrs

Attrs::pattern

fn Attrs::pattern(self : Attrs, value : String) -> Attrs

Attrs::ping

fn Attrs::ping(self : Attrs, value : String) -> Attrs

Attrs::placeholder

fn Attrs::placeholder(self : Attrs, value : String) -> Attrs

Attrs::playsinline

fn Attrs::playsinline(self : Attrs, value : Bool) -> Attrs

Attrs::popover

fn Attrs::popover(self : Attrs, value : String) -> Attrs

Attrs::poster

fn Attrs::poster(self : Attrs, value : String) -> Attrs

Attrs::preload

fn Attrs::preload(self : Attrs, value : String) -> Attrs

Attrs::readonly_

fn Attrs::readonly_(self : Attrs, value : Bool) -> Attrs

Attrs::referrerpolicy

fn Attrs::referrerpolicy(self : Attrs, value : String) -> Attrs

Attrs::rel

fn Attrs::rel(self : Attrs, value : String) -> Attrs

Attrs::required

fn Attrs::required(self : Attrs, value : Bool) -> Attrs

Attrs::reversed

fn Attrs::reversed(self : Attrs, value : Bool) -> Attrs

Attrs::role

fn Attrs::role(self : Attrs, value : String) -> Attrs

Attrs::rows

fn Attrs::rows(self : Attrs, value : Int) -> Attrs

Attrs::rowspan

fn Attrs::rowspan(self : Attrs, value : Int) -> Attrs

Attrs::sandbox

fn Attrs::sandbox(self : Attrs, value : String) -> Attrs

Attrs::scope

fn Attrs::scope(self : Attrs, value : Scope) -> Attrs

Attrs::selected

fn Attrs::selected(self : Attrs, value : Bool) -> Attrs

Attrs::shape

fn Attrs::shape(self : Attrs, value : String) -> Attrs

Attrs::size

fn Attrs::size(self : Attrs, value : Int) -> Attrs

Attrs::sizes

fn Attrs::sizes(self : Attrs, value : String) -> Attrs

Attrs::slot

fn Attrs::slot(self : Attrs, value : String) -> Attrs

Attrs::span

fn Attrs::span(self : Attrs, value : Int) -> Attrs

Attrs::spellcheck

fn Attrs::spellcheck(self : Attrs, value : Bool) -> Attrs

Attrs::src

fn Attrs::src(self : Attrs, value : String) -> Attrs

Attrs::srcdoc

fn Attrs::srcdoc(self : Attrs, value : String) -> Attrs

Attrs::srclang

fn Attrs::srclang(self : Attrs, value : String) -> Attrs

Attrs::srcset

fn Attrs::srcset(self : Attrs, value : String) -> Attrs

Attrs::start

fn Attrs::start(self : Attrs, value : Int) -> Attrs

Attrs::step

fn Attrs::step(self : Attrs, value : Int) -> Attrs

Attrs::style

fn Attrs::style(self : Attrs, key : String, value : String) -> Attrs

Set a style declaration.

Attrs::style_attr

fn Attrs::style_attr(self : Attrs, value : String) -> Attrs

Attrs::summary

fn Attrs::summary(self : Attrs, value : String) -> Attrs

Attrs::tabindex

fn Attrs::tabindex(self : Attrs, value : Int) -> Attrs

Attrs::target

fn Attrs::target(self : Attrs, value : Target) -> Attrs

Attrs::title

fn Attrs::title(self : Attrs, value : String) -> Attrs

Attrs::translate

fn Attrs::translate(self : Attrs, value : String) -> Attrs

Attrs::type_

fn Attrs::type_(self : Attrs, value : String) -> Attrs

Attrs::usemap

fn Attrs::usemap(self : Attrs, value : String) -> Attrs

Attrs::value

fn Attrs::value(self : Attrs, value : String) -> Attrs

Attrs::value_int

fn Attrs::value_int(self : Attrs, value : Int) -> Attrs

Attrs::value_prop

fn Attrs::value_prop(self : Attrs, value : String) -> Attrs

Attrs::width

fn Attrs::width(self : Attrs, value : Int) -> Attrs

Attrs::wrap

fn Attrs::wrap(self : Attrs, value : String) -> Attrs

AutoComplete

pub(all) enum AutoComplete {
On
Off
}

Html

#alias(T)
pub(all) struct Html(
VNode
) derive(Eq)

An HTML value produced by the constructors in this package.

Html::from_vnode

Html::to_virtual_dom

InputType

pub(all) enum InputType {
Button
Checkbox
Color
Date
DateTimeLocal
Email
File
Hidden
Image
Month
Number
Password
Radio
Range
Reset
Search
Submit
Tel
Text
Time
Url
Week
}

Scope

pub(all) enum Scope {
Row
Col
RowGroup
ColGroup
}

Target

pub(all) enum Target {
Self
Blank
}

fn[C : IsChildren] a(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, href~ : String, target? : Target, rel? : String, download? : String, attrs? : Attrs, children : C, escape? : Bool) -> Html

MDN Create a element.

Parameters

  • escape: an optional boolean that determines whether the link should be escaped. By default, it is set to false.

    When escape is set to true, clicking the escaped link will cause the browser to immediately navigate to the href target, bypassing any interception logic. As a result, the UrlRequest message will not be triggered.

  • target: an optional Target that specifies where to open the link.

If the user holds the ctrl key (or the command key on macOS) while clicking the link, the click event will be handled by the browser, and the UrlRequest will not be triggered either.

If App::with_route(url_request=...) is not configured, browser native navigation is used as well.

abbr

fn[C : IsChildren] abbr(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

address

fn[C : IsChildren] address(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

area

fn area(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, alt? : String, coords? : String, shape? : String, href? : String, target? : String, attrs? : Attrs) -> Html

article

fn[C : IsChildren] article(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

aside

fn[C : IsChildren] aside(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

audio

fn[C : IsChildren] audio(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, src? : String, controls? : Bool, autoplay? : Bool, loop_? : Bool, muted? : Bool, preload? : String, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] b(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

base

fn base(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, href? : String, target? : String, attrs? : Attrs) -> Html

bdi

fn[C : IsChildren] bdi(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

bdo

fn[C : IsChildren] bdo(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

blockquote

fn[C : IsChildren] blockquote(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

body

fn[C : IsChildren] body(style? : Array[String], id? : String, class? : String, title? : String, lang? : String, dir? : String, hidden? : Bool, on_scroll? :
Emit
[
Scroll
], on_keydown? :
Emit
[
Keyboard
], on_keyup? :
Emit
[
Keyboard
], attrs? : Attrs, children : C) -> Html
fn br(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs) -> Html

button

fn[C : IsChildren] button(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, type_? : String, disabled? : Bool, name? : String, value? : String, autofocus? : Bool, on_click? :
Cmd
, attrs? : Attrs, children : C) -> Html

caption

fn[C : IsChildren] caption(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

cite

fn[C : IsChildren] cite(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

code

fn[C : IsChildren] code(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

col

fn col(style? : Array[String], id? : String, span? : Int, class? : String, title? : String, hidden? : Bool, attrs? : Attrs) -> Html

colgroup

fn[C : IsChildren] colgroup(style? : Array[String], id? : String, span? : Int, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

data

fn[C : IsChildren] data(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

datalist

fn[C : IsChildren] datalist(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] dd(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

del

fn[C : IsChildren] del(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

details

fn[C : IsChildren] details(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, open? : Bool, attrs? : Attrs, children : C) -> Html

dfn

fn[C : IsChildren] dfn(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

dialog

fn[C : IsChildren] dialog(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, open? : Bool, closedby? : String, on_close? :
Emit
[String], on_cancel? :
Cmd
, attrs? : Attrs, children : C) -> Html

MDN Dialog element.

Hint: You can use the show and close commands in the @dialog package to manipulate the dialog.

Attributes

  • open: indicates whether the dialog is open or closed by default.

  • closedby: emits the limited-support browser closedby attribute. Rabbita does not polyfill dismissal behavior.

Messages

  • close: triggered when the dialog is closed.

    The string payload of the close message is the return value of the dialog.

  • cancel: triggered when the user instructs the browser that they wish to dismiss the current open dialog.

    It can be triggered when the user presses esc or uses the request_close command.

    If the cancel argument is provided, the dialog will not close automatically after this message is triggered. You can use the @dialog.close command to close it or @cmd.none to keep it open.

Example

typealias Model = String

enum Msg {
Open
Closed(String)
YesNo(Bool)
}

fn update(msg : Msg, model : Model) -> (Cmd[Msg], Model) {
match msg {
Open => (@dialog.show("confirm"), model)
YesNo(answer) => (@dialog.close("confirm", return_value=answer.to_string()), model)
Closed(value) => (none(), value)
}
}

fn view(model : Model) -> Html {
div([
h1([text(model)]),
button(on_click=Msg::Open, [text("open")]),
dialog(id="confirm", on_close=Msg::Closed, [
p([text("Are you sure?")]),
button(on_click=YesNo(true), [text("Yes")]),
button(on_click=YesNo(false), [text("No")]),
]),
])
}

fn[C : IsChildren] dl(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] dt(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] em(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

embed

fn embed(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs) -> Html

fencedframe

fn fencedframe(style? : Array[String], id? : String, class? : String, hidden? : Bool, src? : String, title? : String, width? : Int, height? : Int, loading? : String, allow? : String, sandbox? : String, allowfullscreen? : Bool, attrs? : Attrs) -> Html

fieldset

fn[C : IsChildren] fieldset(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, disabled? : Bool, name? : String, attrs? : Attrs, children : C) -> Html

figcaption

fn[C : IsChildren] figcaption(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

figure

fn[C : IsChildren] figure(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] footer(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

form

fn[C : IsChildren] form(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, action? : String, name? : String, on_submit? :
Cmd
, attrs? : Attrs, children : C) -> Html

on_submit will call prevent_default() before dispatching the command. If you need the browser default behavior, use attrs with Attrs::on_submit.

fragment

fn fragment(children : Array[Html]) -> Html

geolocation

fn[C : IsChildren] geolocation(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h1(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, cite? : String, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h2(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h3(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h4(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h5(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] h6(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] head(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] header(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

hgroup

fn[C : IsChildren] hgroup(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn hr(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs) -> Html

html

fn html(style? : Array[String], id? : String, class? : String, title? : String, lang? : String, dir? : String, hidden? : Bool, attrs? : Attrs, children : Array[Html]) -> Html

Constructs the root of an HTML document.

Use this constructor only with exactly one head followed by exactly one body:

html(...) [
head(...),
body(...),
]

This restriction follows the Web platform's special handling of document roots: while parsing HTML, browsers may supply missing <html>, <head>, and <body> elements. Rabbita therefore leaves any other child count, order, tag, or nesting undefined.

For the Web behavior behind this restriction, see MDN: DOMParser.parseFromString().
fn[C : IsChildren] i(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

iframe

fn iframe(style? : Array[String], id? : String, class? : String, hidden? : Bool, src? : String, title? : String, width? : Int, height? : Int, loading? : String, allow? : String, sandbox? : String, allowfullscreen? : Bool, attrs? : Attrs) -> Html

img

fn img(style? : Array[String], id? : String, class? : String, hidden? : Bool, src? : String, alt? : String, title? : String, width? : Int, height? : Int, srcset? : String, sizes? : String, loading? : String, decoding? : String, attrs? : Attrs) -> Html

input

fn input(input_type? : InputType, name? : String, value? : String, checked? : Bool, read_only? : Bool, multiple? : Bool, accept? : String, placeholder? : String, auto_complete? : AutoComplete, style? : Array[String], max? : Int, min? : Int, step? : Int, maxlength? : Int, minlength? : Int, pattern? : String, size? : Int, width? : Int, height? : Int, id? : String, class? : String, title? : String, hidden? : Bool, required? : Bool, autofocus? : Bool, list? : String, inputmode? : String, on_change? :
Emit
[String], on_input? :
Emit
[String], attrs? : Attrs) -> Html

ins

fn[C : IsChildren] ins(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

kbd

fn[C : IsChildren] kbd(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

label

fn[C : IsChildren] label(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, for_? : String, attrs? : Attrs, children : C) -> Html

legend

fn[C : IsChildren] legend(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] li(style? : Array[String], value? : Int, id? : String, class? : String, title? : String, hidden? : Bool, on_click? :
Cmd
, attrs? : Attrs, children : C) -> Html
fn link(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, href? : String, rel? : String, type_? : String, media? : String, sizes? : String, attrs? : Attrs) -> Html

main_

fn[C : IsChildren] main_(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

map

fn[C : IsChildren] map(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, name? : String, attrs? : Attrs, children : C) -> Html

mark

fn[C : IsChildren] mark(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

math

fn[C : IsChildren] math(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] menu(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

meta

fn meta(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, charset? : String, name? : String, content? : String, http_equiv? : String, attrs? : Attrs) -> Html

meter

fn[C : IsChildren] meter(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, value? : Int, min? : Int, max? : Int, low? : Int, high? : Int, optimum? : Int, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] nav(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

node

fn[C : IsChildren] node(tag : String, attrs : Attrs, children : C) -> Html

noscript

fn[C : IsChildren] noscript(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

nothing

let nothing : Html

Represents an empty element

object

fn[C : IsChildren] object(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] ol(style? : Array[String], reversed? : Bool, start? : Int, id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

MDN Notice that the type attribute for ol is not important for the browser now. If you want to change the type of the list, you should use the list-style-type property in CSS.

optgroup

fn[C : IsChildren] optgroup(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, label? : String, disabled? : Bool, attrs? : Attrs, children : C) -> Html

option

fn[C : IsChildren] option(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, label? : String, disabled? : Bool, value? : String, selected? : Bool, attrs? : Attrs, children : C) -> Html

output

fn[C : IsChildren] output(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, name? : String, for_? : String, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] p(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

picture

fn[C : IsChildren] picture(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

pre

fn[C : IsChildren] pre(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

progress

fn[C : IsChildren] progress(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, value? : Int, max? : Int, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] q(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] rp(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] rt(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

ruby

fn[C : IsChildren] ruby(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] s(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

samp

fn[C : IsChildren] samp(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

script

fn[C : IsChildren] script(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, src? : String, type_? : String, async_? : Bool, defer_? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] search(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

section

fn[C : IsChildren] section(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

select

fn[C : IsChildren] select(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, disabled? : Bool, name? : String, multiple? : Bool, size? : Int, required? : Bool, autofocus? : Bool, on_change? :
Emit
[String], attrs? : Attrs, children : C) -> Html

selectedcontent

fn[C : IsChildren] selectedcontent(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

slot

fn[C : IsChildren] slot(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

small

fn[C : IsChildren] small(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

source

fn source(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, src? : String, srcset? : String, media? : String, type_? : String, sizes? : String, attrs? : Attrs) -> Html

span

fn[C : IsChildren] span(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

strong

fn[C : IsChildren] strong(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

style_tag

fn[C : IsChildren] style_tag(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

sub

fn[C : IsChildren] sub(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

summary

fn[C : IsChildren] summary(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

sup

fn[C : IsChildren] sup(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

svg

fn[C : IsChildren] svg(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

table

fn[C : IsChildren] table(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

tbody

fn[C : IsChildren] tbody(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] td(style? : Array[String], id? : String, colspan? : Int, rowspan? : Int, headers? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

template

fn[C : IsChildren] template(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

text

fn text(str : String) -> Html

textarea

fn[C : IsChildren] textarea(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, name? : String, value? : String, rows? : Int, cols? : Int, placeholder? : String, read_only? : Bool, disabled? : Bool, maxlength? : Int, minlength? : Int, required? : Bool, autofocus? : Bool, wrap? : String, on_change? :
Emit
[String], on_input? :
Emit
[String], attrs? : Attrs, children : C) -> Html

tfoot

fn[C : IsChildren] tfoot(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] th(style? : Array[String], id? : String, abbr? : String, colspan? : Int, rowspan? : Int, headers? : String, scope? : Scope, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

thead

fn[C : IsChildren] thead(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

time

fn[C : IsChildren] time(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, datetime? : String, attrs? : Attrs, children : C) -> Html

title

fn[C : IsChildren] title(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] tr(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

track

fn track(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, kind? : String, srclang? : String, label? : String, default? : Bool, src? : String, attrs? : Attrs) -> Html
fn[C : IsChildren] u(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html
fn[C : IsChildren] ul(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, on_click? :
Cmd
, attrs? : Attrs, children : C) -> Html

var_

fn[C : IsChildren] var_(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs, children : C) -> Html

video

fn[C : IsChildren] video(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, src? : String, controls? : Bool, autoplay? : Bool, loop_? : Bool, muted? : Bool, preload? : String, poster? : String, attrs? : Attrs, children : C) -> Html

wbr

fn wbr(style? : Array[String], id? : String, class? : String, title? : String, hidden? : Bool, attrs? : Attrs) -> Html