Focus component helps you manage focus of input components in the view.

The component can be used either in a form or in a view - there can be only one focus per form and, if both, form- and view-based focuses are defined, a form one takes a priority. A view-based focus defines behavior for all forms in a view.

Focus reflects results of validation of components in a view. Focus is given to a first input component in a page which is invalid. The order of input components is determined on client-side and it reflects tabindex and position in a page. You can prioritize focusing of specific component by increasing its tabindex.

Focus can be configured to keep focus on input component which has been focused before form submission.

Focus is applied each time it is rendered - either on form submission or after AJAX request. To turn off focusing after AJAX request, you can use `ajaxRendered=false`.

In following example, focus is initially given to Name input. If you enter invalid name (less than 3 chars) and submit (hit enter), focus is given again to Name input. This way user is directed to enter valid input.