wrap
fun <Value> MutablePreviewLabField<Value>.wrap(wrapRange: WrapRange = WrapRange.OnlyContent, content: @Composable (@Composable () -> Unit) -> Unit): WrapField<Value>
Wraps this field with additional composable content.
This extension function provides a convenient way to add decorations or modifications around an existing field's UI. Common use cases include:
Adding tooltips or speech bubbles
Wrapping with animations
Adding visual indicators or badges
Example:
IntField("Count", 0)
.wrap { content ->
Box {
content()
Badge(text = "New")
}
}Content copied to clipboard
Return
A new WrapField that wraps this field
Parameters
wrapRange
Determines which part of the field to wrap. Defaults to WrapRange.OnlyContent
content
A composable that receives the original content as a parameter and renders it with wrapping