---
title: "FocusOrder"
description: "Specifies custom focus destinations that are used instead of the default focus traversal order."
type: "class"
---

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


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

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


> **Deprecated** Use FocusProperties instead

```kotlin
class FocusOrder internal constructor(private val focusProperties: FocusProperties)
```


Specifies custom focus destinations that are used instead of the default focus traversal order.


## Secondary Constructors

```kotlin
constructor() : this(FocusPropertiesImpl())
```

## Properties

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


```kotlin
var next: FocusRequester
```


A custom item to be used when the user requests a focus moves 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 a focus moves 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.




## Code Examples

### CustomFocusOrderSample
```kotlin
@Composable
fun CustomFocusOrderSample() {
    Column(Modifier.fillMaxSize(), Arrangement.SpaceEvenly) {
        val (item1, item2, item3, item4) = remember { FocusRequester.createRefs() }
        Row(Modifier.fillMaxWidth(), Arrangement.SpaceEvenly) {
            Box(
                Modifier.focusRequester(item1)
                    .focusProperties {
                        next = item2
                        right = item2
                        down = item3
                        previous = item4
                    }
                    .focusable()
            )
            Box(
                Modifier.focusRequester(item2)
                    .focusProperties {
                        next = item3
                        right = item1
                        down = item4
                        previous = item1
                    }
                    .focusable()
            )
        }
        Row(Modifier.fillMaxWidth(), Arrangement.SpaceEvenly) {
            Box(
                Modifier.focusRequester(item3).focusProperties {
                    next = item4
                    right = item4
                    up = item1
                    previous = item2
                }
            )
            Box(
                Modifier.focusRequester(item4).focusProperties {
                    next = item1
                    left = item3
                    up = item2
                    previous = item3
                }
            )
        }
    }
}
```

