Node

The builder all element factories return. Chains accumulate; .build() finalizes and surfaces any allocation error.

Attributes

MethodNotes
attr(key, val) / attrFmt(key, fmt, args)arbitrary
class(v) id(v) href(v) name(v) type_(v) value(v) src(v) alt(v) placeholder(v)common shorthands
required() autofocus()boolean attrs
role(v) ariaLabel(v) ariaLive(v) ariaCurrent(v) ariaPressed(b) ariaExpanded(b) ariaHidden(b)accessibility

Content

MethodNotes
text(t)escaped text content
textFmt(fmt, args) / textInt(n)formatted (arena)
children(.{ a, b, … })append child tuple
raw(bytes)verbatim — caller guarantees safety
contentType(t)response content-type for fragment routes

Reactivity & events

MethodEmits
bind(signal_name)z-bind — text follows the named signal
bindI32/bindStr/bindF32(name, initial)bind + typed initial
bindBool(name, class_name, initial)class toggle binding
onClick(export_name)z-on-click — named wasm export
onWheel/onPointerDown/Move/Up/Over/Out/Cancel/onDblClick(name)pointer family
onClickFn/onSubmitFn/onInputFn/onChangeFn/onKeydownFn(slot_id)closure-id variants (z-on-*-id)
ref(noderef)data-ref handle for queryRef
slot(slot_name)template slot marker

Animation hooks

animate(tween_or_timeline) · animateJson(json) · draggable(opts) / draggableJson(json) · splitText(.{ .by = .chars|.words|.lines }) · smoothScroll(Smoother) · parallaxSpeed(f) · parallaxLag(f).

Finalize

build() !*Node — returns the node or the first error accumulated anywhere in the chain (allocation failures poison the node rather than forcing try mid-chain).