onFocusedVisible

fun Style.onFocusedVisible(visibleWidthRatio: Float = 0.0f, visibleHeightRatio: Float = 0.0f, callback: (FocusedVisibleEvent) -> Unit): Style

Registers a callback to be called when either the Component occupies at least half of the viewport, or, if the Component is smaller than half the viewport, when it is fully visible.

Parameters

visibleWidthRatio

Ratio of the Component width for the focused callback to be dispatched. Default is 0f.

visibleHeightRatio

Ratio of the Component height for the focused callback to be dispatched. Default is 0f.

callback

Callback to be invoked when the component becomes focused visible.