Package-level declarations

Types

Link copied to clipboard
annotation class Preview(val name: String = "", val widthPx: Int = -1, val heightPx: Int = -1, val lookAndFeel: String = "")

Marks a composable that an IDE may render on its own, so a component can be seen without running the application.

Link copied to clipboard

Prepares the JVM that renders this classpath's Previews, so every one of them is rendered the way the application would render it.

Properties

Link copied to clipboard

Whether the compositions this library mounts record where each component was declared, which is what findDeclaringGroup, findCompositionData and attachComposeStackTrace answer from. false by default.

Functions

Link copied to clipboard

Attaches the composition stack trace of this component's declaration to throwable as a suppressed exception, and reports whether it did. The trace names the composable that declared the component, the calls that led there and the file and line of each.

Link copied to clipboard
fun Component.findCompositionData(): CompositionData?

The data of the nearest composition this component hosts or stands in, or null where there is none. It answers whether or not that composition declared the component, so a component built by hand and added to composed content is answered with the composition it stands in.

Link copied to clipboard
fun Component.findDeclaringGroup(): CompositionGroup?

The group that declared this component, or null where no composition this library mounted declared it - a component built by hand, and one whose composition has not recorded yet.