# Initial Focus

The Dialog provides the ability to specify which element receives focus when the component opens.

By default, the Dialog focuses the first focusable element in its content, excluding the elements in the title bar. To focus a specific element instead, set the [`autoFocusedElement`](https://www.telerik.com/kendo-react-ui/components/dialogs/api/dialogprops#autofocusedelement) property to a query selector that matches an element inside the Dialog.

To focus the Dialog wrapper instead, set the [`autoFocus`](https://www.telerik.com/kendo-react-ui/components/dialogs/api/dialogprops#autofocus) property to `true`. When `autoFocus` is `true` and `autoFocusedElement` is not set, the Dialog focuses its wrapper. When both are set, the Dialog ignores `autoFocusedElement` and focuses the first focusable element in its content, excluding the title bar.

The following example focuses the first input element instead of the first focusable element in the Dialog.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dialogs/dialog/initial-focus/source.txt)

## Suggested Links

* [API Reference of the Dialog](https://www.telerik.com/kendo-react-ui/components/dialogs/api/dialog)
