Property

MinimumInteractiveTopAlignmentLine

The horizontal AlignmentLine representing the top edge of the component's original visual bounds before any additional space is added by Modifier.minimumInteractiveComponentSize to meet minimum touch target requirements.

Source set: Common

Added in 1.5.0-alpha17

val MinimumInteractiveTopAlignmentLine = HorizontalAlignmentLine(::min)

The horizontal AlignmentLine representing the top edge of the component's original visual bounds before any additional space is added by Modifier.minimumInteractiveComponentSize to meet minimum touch target requirements.

When a component's height is less than the minimum interactive size (e.g., LocalMinimumInteractiveComponentSize), Modifier.minimumInteractiveComponentSize expands the layout space. This alignment line provides the offset from the top edge of the expanded bounds to the top edge of the original component content (i.e., its visual bounds). This allows other layouts to align to the component's visual top, ignoring the extra touch-target spacing.

The value of this alignment line is the amount of space added above the component's original top edge. Since Modifier.minimumInteractiveComponentSize centers the content, an equal amount of space is also added below the component.

Visual representation:

Expanded Layout (after Modifier.minimumInteractiveComponentSize() was applied)
+------------------------+  ---
|                        |   ^  Value of MinimumInteractiveTopAlignmentLine
|                        |   v
|----+--------------+----| --- MinimumInteractiveTopAlignmentLine
|    |  Component   |    |
|----+--------------+----|
|                        |
|                        |
+------------------------+