androidx.compose.foundation

focusable

Function · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

Configure component to be focusable via focus system or accessibility "focus" event.

Parameters

fun Modifier.focusable(
    enabled: Boolean = true,
    interactionSource: MutableInteractionSource? = null,
)

enabled: BooleanOptional

Default: true

Controls the enabled state. When false, element won't participate in the focus

interactionSource: MutableInteractionSource?Optional

Default: null

MutableInteractionSource that will be used to emit FocusInteraction.Focus when this element is being focused.

Library docs

Configure component to be focusable via focus system or accessibility "focus" event.

Add this modifier to the element to make it focusable within its bounds.