toAttrs

fun <A : AttrsScope<Element>> Modifier.toAttrs(finalHandler: A.() -> Unit? = null): A.() -> Unit(source)

Convert a Modifier into an AttrsScope which Compose HTML tags take as an argument, e.g. use it like so:

Div(attrs = modifier.toAttrs())

Parameters

finalHandler

A handler which, if supplied, gets called at the very end before returning the builder. This can be useful to occasionally avoid the creation of an unnecessary AttrsModifier to append at the tail.