<div class='type'>Compose Modifier</div>

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


<h2 id="focusgroup">focusGroup</h2>

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


```kotlin
fun Modifier.focusGroup(): Modifier
```


Creates a focus group or marks this component as a focus group. This means that when we move
focus using the keyboard or programmatically using
`FocusManager.moveFocus()`, the items within
the focus group will be given a higher priority before focus moves to items outside the focus
group.

In the sample below, each column is a focus group, so pressing the tab key will move focus to all
the buttons in column 1 before visiting column 2.


Note: The focusable children of a focusable parent automatically form a focus group. This
modifier is to be used when you want to create a focus group where the parent is not focusable.
If you encounter a component that uses a `focusGroup` internally, you can make it focusable by
using a `focusable` modifier. In the second sample here, the
`LazyRow` is a focus group that is not itself
focusable. But you can make it focusable by adding a `focusable` modifier.