NodePropsBuilder

Builder for a node's NodeProps: its id, classes, inline style, and event bindings.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var id: String?

The node's id attribute.

Link copied to clipboard
var onBlur: <Error class: unknown class>?

Binding fired on the onblur event. See onBlur for the params helper.

Link copied to clipboard
var onChange: <Error class: unknown class>?

Binding fired on the onchange event. See onChange for the params helper.

Link copied to clipboard
var onClick: <Error class: unknown class>?

Binding fired on the onclick event. Assign an Event directly, or use the onClick helper to build one with typed params.

Link copied to clipboard
var onFocus: <Error class: unknown class>?

Binding fired on the onfocus event. See onFocus for the params helper.

Functions

Link copied to clipboard
fun build(): <Error class: unknown class>

Builds the NodeProps from the configured fields.

Link copied to clipboard
fun className(vararg names: String)

Adds CSS class names to this node's class list (accumulates across calls).

Link copied to clipboard
fun extras(key: String, value: <Error class: unknown class>)

Sets an unknown prop key, preserved verbatim in NodeProps.extras under key.

Link copied to clipboard
fun onBlur(name: String, params: EventParamsBuilder.() -> Unit? = null)

Sets onBlur to an Event named name with optional typed params.

Link copied to clipboard
fun onChange(name: String, params: EventParamsBuilder.() -> Unit? = null)

Sets onChange to an Event named name with optional typed params.

Link copied to clipboard
fun onClick(name: String, params: EventParamsBuilder.() -> Unit? = null)

Sets onClick to an Event named name with optional typed params.

Link copied to clipboard
fun onFocus(name: String, params: EventParamsBuilder.() -> Unit? = null)

Sets onFocus to an Event named name with optional typed params.

Link copied to clipboard
fun style(value: <Error class: unknown class>)

Sets the inline Style block from a prebuilt value.

fun style(block: StyleBuilder.() -> Unit)

Sets the inline Style block via StyleBuilder.