Package-level declarations

Types

Link copied to clipboard
sealed interface Alignment
Link copied to clipboard
class AttrsModifier(attrs: AttrsScope<*>.() -> Unit) : WebModifier

A modifier element which works by setting CSS styles and/or attributes when it is applied.

Link copied to clipboard
interface Modifier

A parent interface that represents a collection of zero (or more) modifier elements.

Link copied to clipboard
class StyleModifier(styles: StyleScope.() -> Unit) : WebModifier

A modifier element that works by CSS styles when it is applied.

Link copied to clipboard

Functions

Link copied to clipboard
fun Modifier.attrsModifier(attrs: AttrsScope<*>.() -> Unit): Modifier
Link copied to clipboard
fun Modifier.styleModifier(styles: StyleScope.() -> Unit): Modifier
Link copied to clipboard
fun Modifier.thenIf(condition: Boolean, other: Modifier): Modifier

Like then but the other modifier is only applied if the condition is true.

inline fun Modifier.thenIf(condition: Boolean, lazyProduce: () -> Modifier): Modifier

Like the version of thenIf which takes in a modifier directly, but it produces that modifier lazily.

Link copied to clipboard
inline fun <T> Modifier.thenIfNotNull(value: T?, consume: (T) -> Modifier): Modifier
Link copied to clipboard
fun Modifier.thenUnless(condition: Boolean, other: Modifier): Modifier

Like thenIf but with an inverted condition.

inline fun Modifier.thenUnless(condition: Boolean, lazyProduce: () -> Modifier): Modifier

Like the version of thenUnless which takes in a modifier directly, but it produces that modifier lazily.

Link copied to clipboard
fun <A : AttrsScope<Element>> Modifier.toAttrs(finalHandler: A.() -> Unit? = null): A.() -> Unit

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

Link copied to clipboard
fun Modifier.toStyles(finalHandler: StyleScope.() -> Unit? = null): StyleScope.() -> Unit

Convert a Modifier into a StyleScope which can be used to initialize a StyleSheet, for example.