Modifier

Immutable ordered active modifier descriptions.

The first description is the outermost node and the last description is nearest the component. Composition is value based when its descriptions obey the immutable modifier contract. The runtime reconciles modifier positions by referential ModifierNodeType token.

Parameters

elements

the immutable ordered descriptions owned by this value.

Types

Link copied to clipboard
object Companion

Common modifier values.

Functions

Link copied to clipboard

Captures the typed action handlers declared directly on this modifier chain.

Link copied to clipboard

Paints a color across the modifier's complete local bounds before its content. The new behavior is appended inside the existing modifier chain, so existing outer paint behavior remains earlier.

Link copied to clipboard

Sizes the modified component to a Minecraft 26.2 generic chest panel and paints its background before content.

Link copied to clipboard

Returns the immutable description snapshot to the retained runtime.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Fills a bounded parent height while preserving an unbounded height. The new behavior is appended inside the existing modifier chain and leaves the width policy unchanged.

Link copied to clipboard

Fills every bounded parent axis while preserving unbounded axes. The new behavior is appended inside the existing modifier chain.

Link copied to clipboard

Fills a bounded parent width while preserving an unbounded width. The new behavior is appended inside the existing modifier chain and leaves the height policy unchanged.

Link copied to clipboard

Makes the logical component a keyboard and text-input focus target.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun Modifier.height(height: Int): Modifier

Constrains the height to an exact requested size after clamping it into the parent constraints. The new behavior is appended inside the existing modifier chain and leaves the width policy unchanged.

Link copied to clipboard
fun Modifier.heightIn(min: Int = 0, max: Int = Int.MAX_VALUE): Modifier

Constrains the height to an independently clamped inclusive range. A requested range disjoint from its parent range is pinned to the nearest parent boundary. Int.MAX_VALUE remains an unbounded maximum, and the new behavior is appended inside the existing modifier chain.

Link copied to clipboard
fun Modifier.imageBackground(source: ImageSource, scale: ImageScale = ImageScale.Stretch): Modifier

Paints arbitrary immutable image pixels behind the modified component's content.

fun Modifier.imageBackground(source: ImageSource, border: Insets, centerMode: NineSliceCenterMode = NineSliceCenterMode.Tiled): Modifier

Paints arbitrary immutable image pixels as a Minecraft-compatible nine-slice background behind content.

Link copied to clipboard

Makes the logical component the initial focus target when layout has no retained focus owner.

Link copied to clipboard

Paints the selected Minecraft menu texture behind the modified component's content.

Link copied to clipboard
fun <T : Any> Modifier.onAction(key: ActionKey<T>, callback: (T) -> ActionResult): Modifier

Handles one typed component action emitted by the component wrapped by this modifier.

Link copied to clipboard

Adds a focused committed-character callback.

Link copied to clipboard

Handles and consumes Checkbox selected-value changes.

Link copied to clipboard
fun <T : Any> Modifier.onCycle(action: (T) -> Unit): Modifier

Handles and consumes typed CycleButton value changes.

Link copied to clipboard
fun Modifier.onDrag(action: () -> Unit): Modifier

Runs action for every pointer drag that hits this modifier without consuming the event.

Handles every pointer drag that hits this modifier's laid-out bounds.

Link copied to clipboard

Adds a callback for distinct retained focus transitions and makes the logical component focusable.

Link copied to clipboard

Observes distinct pointer enter and exit transitions for this modifier's laid-out bounds.

Link copied to clipboard

Adds a focused callback for every key press and release.

Link copied to clipboard

Adds a focused key-press callback.

Link copied to clipboard

Adds a focused key-release callback.

Link copied to clipboard

Handles and consumes demand for rows before a virtual list's loaded window.

Link copied to clipboard
fun Modifier.onMove(action: () -> Unit): Modifier

Runs action for every pointer move that hits this modifier without consuming the event.

Handles every pointer move that hits this modifier's laid-out bounds.

Link copied to clipboard

Handles every typed pointer event that hits this modifier's laid-out bounds.

Link copied to clipboard

Adds a focused input-method preedit callback.

Link copied to clipboard
fun Modifier.onPress(action: () -> Unit): Modifier

Runs action for every primary pointer press that hits this modifier and consumes the event. Other button presses remain ignored so lower or earlier handlers can process them.

Handles every pointer press that hits this modifier's laid-out bounds.

Link copied to clipboard
fun Modifier.onRelease(action: () -> Unit): Modifier

Runs action for every pointer release that hits this modifier and consumes the event.

Handles every pointer release that hits this modifier's laid-out bounds.

Link copied to clipboard
fun Modifier.onScroll(action: () -> Unit): Modifier

Runs action for every pointer scroll event that hits this modifier and consumes the event.

Handles every pointer scroll event that hits this modifier's laid-out bounds.

Link copied to clipboard
fun <K : Any> Modifier.onSelectionChange(action: (K) -> Unit): Modifier

Handles and consumes typed SelectionList key changes.

Link copied to clipboard

Handles and consumes Slider numeric-value changes.

Link copied to clipboard

Adds a focused callback for both committed characters and input-method preedit updates.

Link copied to clipboard

Handles and consumes demand for rows after a virtual list's loaded window.

Link copied to clipboard

Adds checked distances around the virtual child. The new behavior is appended inside the existing modifier chain. Measurement reports an ArithmeticException if a measured child extent plus the checked inset total overflows.

Adds one distance around every side of the virtual child. The new behavior is appended inside the existing modifier chain.

fun Modifier.padding(horizontal: Int, vertical: Int): Modifier

Adds equal horizontal and equal vertical distances around the virtual child. The new behavior is appended inside the existing modifier chain.

fun Modifier.padding(left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0): Modifier

Adds independently specified distances around the virtual child. Unspecified sides default to zero, and the new behavior is appended inside the existing modifier chain.

Link copied to clipboard

Emits one separate unresolved semantics entry before entries produced by the modifier's content. The new behavior is appended inside the existing modifier chain, so existing outer entries remain earlier.

Link copied to clipboard
fun Modifier.size(width: Int, height: Int): Modifier

Constrains both axes to exact requested sizes after clamping them into the parent constraints. The new behavior is appended inside the existing modifier chain.

Link copied to clipboard
fun Modifier.sizeIn(minWidth: Int = 0, minHeight: Int = 0, maxWidth: Int = Int.MAX_VALUE, maxHeight: Int = Int.MAX_VALUE): Modifier

Constrains both axes to independently clamped inclusive ranges. A requested range disjoint from its parent range is pinned to the nearest parent boundary. Int.MAX_VALUE remains an unbounded maximum, and the new behavior is appended inside the existing modifier chain.

Link copied to clipboard
fun then(modifier: Modifier): Modifier

Appends another chain inside the existing chain.

Appends one description inside the existing chain.

Link copied to clipboard
fun Modifier.tooltip(text: UiText, delayMillis: Long = 500): Modifier

Shows a profile-backed root tooltip while the modified element remains hovered.

fun Modifier.tooltip(text: String, delayMillis: Long = 500): Modifier

Literal-text overload of tooltip.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun Modifier.width(width: Int): Modifier

Constrains the width to an exact requested size after clamping it into the parent constraints. The new behavior is appended inside the existing modifier chain and leaves the height policy unchanged.

Link copied to clipboard
fun Modifier.widthIn(min: Int = 0, max: Int = Int.MAX_VALUE): Modifier

Constrains the width to an independently clamped inclusive range. A requested range disjoint from its parent range is pinned to the nearest parent boundary. Int.MAX_VALUE remains an unbounded maximum, and the new behavior is appended inside the existing modifier chain.