🌈 Create new beautiful Compose Gradients with our new wesite ->
Composable Function

collectIsFocusedAsState

Subscribes to this MutableInteractionSource and returns a State representing whether this component is focused or not.

collectIsFocusedAsState

Source set: Common
@Composable
public fun InteractionSource.collectIsFocusedAsState(): State<Boolean>

Subscribes to this MutableInteractionSource and returns a State representing whether this component is focused or not.

FocusInteraction is typically set by androidx.compose.foundation.focusable and focusable components, such as androidx.compose.foundation.text.BasicTextField.

Return

State representing whether this component is being focused or not