---
title: "FocusProperties"
description: "Properties that are applied to [focusTarget] that is the first child of the
[FocusPropertiesModifierNode] that sets these properties."
type: "interface"
---

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


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

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



```kotlin
interface FocusProperties
```


Properties that are applied to `focusTarget` that is the first child of the
`FocusPropertiesModifierNode` that sets these properties.


## Properties

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


```kotlin
var canFocus: Boolean
```


When set to false, indicates that the `focusTarget` that this is applied to can no longer
take focus. If the `focusTarget` is currently focused, setting this property to false will
end up clearing focus.



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


```kotlin
var next: FocusRequester
```


A custom item to be used when the user requests the focus to move to the "next" item.



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


```kotlin
var previous: FocusRequester
```


A custom item to be used when the user requests the focus to move to the "previous" item.



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


```kotlin
var up: FocusRequester
```


A custom item to be used when the user moves focus "up".



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


```kotlin
var down: FocusRequester
```


A custom item to be used when the user moves focus "down".



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


```kotlin
var left: FocusRequester
```


A custom item to be used when the user requests a focus moves to the "left" item.



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


```kotlin
var right: FocusRequester
```


A custom item to be used when the user requests a focus moves to the "right" item.



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


```kotlin
var start: FocusRequester
```


A custom item to be used when the user requests a focus moves to the "left" in LTR mode and
"right" in RTL mode.



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


```kotlin
var end: FocusRequester
```


A custom item to be used when the user requests a focus moves to the "right" in LTR mode and
"left" in RTL mode.



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


> **Deprecated** Use onEnter instead

```kotlin
@ExperimentalComposeUiApi

var enter: (FocusDirection) -> FocusRequester
```


A custom item to be used when the user requests focus to move focus in
(`FocusDirection.Enter`). An automatic `Enter`" can be triggered when
we move focus to a focus group that is not itself focusable. In this case, users can use the
the focus direction that triggered the move in to determine the next item to be focused on.

When you set the `enter` property, provide a lambda that takes the FocusDirection that
triggered the enter as an input, and provides a `FocusRequester` as an output. You can return
a custom destination by providing a `FocusRequester` attached to that destination, a
`Cancel` to cancel the focus enter or
`Default` to use the default focus enter behavior.



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


```kotlin
var onEnter: FocusEnterExitScope.() -> Unit
```


A custom item to be used when the user requests focus to move focus in
(`FocusDirection.Enter`). An automatic `Enter`" can be triggered when
we move focus to a focus group that is not itself focusable. In this case, users can use the
the focus direction that triggered the move in to determine the next item to be focused on.

When you set the `onEnter` property, provide a lambda with the `FocusEnterExitScope` scope,
having the `FocusEnterExitScope.requestedFocusDirection` that triggered the enter as an
input. If redirection is required, use `FocusRequester.requestFocus` and if the focus change
should be canceled, use `FocusEnterExitScope.cancelFocusChange`.



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


> **Deprecated** Use onExit instead

```kotlin
@ExperimentalComposeUiApi

var exit: (FocusDirection) -> FocusRequester
```


A custom item to be used when the user requests focus to move out (`FocusDirection.Exit`). An
automatic `Exit` can be triggered when we move focus outside the edge of
a parent. In this case, users can use the focus direction that triggered the move out to
determine the next focus destination.

When you set the `exit` property, provide a lambda that takes the FocusDirection that
triggered the exit as an input, and provides a `FocusRequester` as an output. You can return
a custom destination by providing a `FocusRequester` attached to that destination, a
`Cancel` to cancel the focus exit or `Default`
to use the default focus exit behavior.



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


```kotlin
var onExit: FocusEnterExitScope.() -> Unit
```


A custom item to be used when the user requests focus to move out (`FocusDirection.Exit`). An
automatic `Exit` can be triggered when we move focus outside the edge of
a parent. In this case, users can use the focus direction that triggered the move out to
determine the next focus destination.

When you set the `onExit` property, provide a lambda with the `FocusEnterExitScope` scope,
having the `FocusEnterExitScope.requestedFocusDirection` that triggered the exit as an input.
If redirection is required, use `FocusRequester.requestFocus` and if the focus change should
be canceled, use `FocusEnterExitScope.cancelFocusChange`.



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


```kotlin
var focusRect: Rect
```


Sets the focus area for the associated focus target to which these `FocusProperties` are
applied on.

If you simply ignore and do not set this value, `UnsetFocusRect` will be used. Or
alternatively you can set this value to `UnsetFocusRect` to prevent other `FocusProperties`
nodes in the chain from customizing the focus area.




