layout

fun layout(type: String, block: NodeBuilder.() -> Unit = {})

Sets the root layout to a node of the given type, built via NodeBuilder.

Parameters

block

configures the root node; defaults to an empty body.


fun layout(block: LayoutScope.() -> Unit)

Sets the root layout from a LayoutScope body. The body must contribute exactly one top-level node (e.g. a single div { ... }).

Throws

IllegalStateException

if block produces no top-level node.


fun layout(node: <Error class: unknown class>)

Sets the root layout from a prebuilt Node.