In [[SwiftUI]], when developing a [[SwiftUI View Protocol|View]] element, we can define properties using the `@FocusedState` property wrapper. It can be applied to a boolean property, and will allow us to store there if a given element is focused or not.
To define the element whose focus is to be stored, we can used in input fields like a `TextField` a `.focused($property)` modifier, which will [[Two Way Binding in SwiftUI|two-way-bind]] the property and the element. Modifying the value of the property (for example, using a button) will also reflect is the field is to be focused or not.