---
title: "FocusEnterExitScope"
description: "Receiver scope for [FocusProperties.onEnter] and [FocusProperties.onExit]. Developers can change
focus with [FocusRequester.requestFocus] to change the focus or [cancelFocusChange] to stop the
focus from changing."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
sealed interface FocusEnterExitScope
```


Receiver scope for `FocusProperties.onEnter` and `FocusProperties.onExit`. Developers can change
focus with `FocusRequester.requestFocus` to change the focus or `cancelFocusChange` to stop the
focus from changing.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val requestedFocusDirection: FocusDirection
```


The direction used to get into (with `FocusProperties.onEnter`) or leave (with
`FocusProperties.onExit`) focus.



## Functions

```kotlin
fun cancelFocusChange()
```


Stop focus from changing.


```kotlin
@ExperimentalComposeUiApi
    
    fun cancelFocus() = cancelFocusChange()
```


