Package-level declarations

Types

Link copied to clipboard
typealias Attrs<Element> = AttrsScope<Element>.() -> Unit
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun AttrsScope<*>.attr(attr: String, value: Boolean = true): AttrsScope<Element>

Adds an attribute that is made present by its key aka attr.

fun AttrsScope<*>.attr(attr: String, value: Int): AttrsScope<Element>

Int attributes are used in Compose HTML. See org.jetbrains.compose.web.attributes.maxLength for example.

fun AttrsScope<*>.attr(attr: String, value: Number): AttrsScope<Element>
Link copied to clipboard
fun AttrsScope<*>.attrIfNotNull(attr: String, value: Boolean?)
fun AttrsScope<*>.attrIfNotNull(attr: String, value: Int?)
fun AttrsScope<*>.attrIfNotNull(attr: String, value: Number?)
fun AttrsScope<*>.attrIfNotNull(attr: String, value: String?)
Link copied to clipboard
inline fun <TElement : Element> attrs(noinline attrs: AttrBuilderContext<TElement>): AttrsScope<TElement>.() -> Unit

A helper function to create AttrBuilderContexts where type inference doesn't work

Link copied to clipboard
fun AttrsScope<*>.autoCapitalize(value: AutoCapitalize): AttrsScope<Element>
fun AttrsScope<*>.autoCapitalize(value: String): AttrsScope<Element>
Link copied to clipboard
fun AttrsScope<*>.autocorrect(onOrOff: Boolean): AttrsScope<Element>
fun AttrsScope<*>.autocorrect(value: String): AttrsScope<Element>
Link copied to clipboard
fun AttrsScope<*>.booleanAttr(attr: String, value: Boolean): AttrsScope<Element>

Adds an attribute that has an explicit Boolean value unlike attr.

Link copied to clipboard
fun AttrsScope<*>.enterKeyHint(value: EnterKeyHint): AttrsScope<Element>
fun AttrsScope<*>.enterKeyHint(value: String): AttrsScope<Element>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun <TElement : Element> AttrBuilderContext<TElement>.plus(other: AttrBuilderContext<TElement>?): AttrBuilderContext<TElement>
Link copied to clipboard
fun AttrsScope<*>.slot(value: String): AttrsScope<Element>
Link copied to clipboard