Compose Modifier

focusable

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

focusable

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

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.

Parameters

enabled Controls the enabled state. When false, element won't participate in the focus
interactionSource MutableInteractionSource that will be used to emit FocusInteraction.Focus when this element is being focused.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: