---
title: projectedValue
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/focusstate/projectedvalue
---

# projectedValue

A projection of the focus state value that returns a binding.

## Declaration

```swift
var projectedValue: FocusState<Value>.Binding { get }
```

## Discussion

Discussion When focus is outside any view that is bound to this state, the wrapped value is nil for optional-typed state or false for Boolean state. In the following example of a simple navigation sidebar, when the user presses the Filter Sidebar Contents button, focus moves to the sidebar’s filter text field. Conversely, if the user moves focus to the sidebar’s filter manually, then the value of isFiltering automatically becomes true, and the sidebar view updates. struct Sidebar: View {     @State private var filterText = ""     @FocusState private var isFiltering: Bool

var body: some View {         VStack {             Button("Filter Sidebar Contents") {                 isFiltering = true             }

TextField("Filter", text: $filterText)                 .focused($isFiltering)         }     } }

## See Also

### Inspecting the focus state

- [FocusState.Binding](swiftui/focusstate/binding.md)
- [wrappedValue](swiftui/focusstate/wrappedvalue.md)
