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

# projectedValue

A projection of the observed object that creates bindings to its properties.

## Declaration

```swift
@MainActor @preconcurrency var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
```

## Discussion

Discussion Use the projected value to get a Binding to a property of an observed object. To access the projected value, prefix the property variable with a dollar sign ($). For example, you can get a binding to a model’s isEnabled Boolean so that a Toggle can control its value: struct MySubView: View {     @ObservedObject var model: DataModel

var body: some View {         Toggle("Enabled", isOn: $model.isEnabled)     } } important: A Binding created by the projected value must only be read from, or written to by the main actor. Failing to do so may result in undefined behavior, or data loss. When this occurs, SwiftUI will issue a runtime warning. In a future release, a crash will occur instead.

## See Also

### Getting the value

- [wrappedValue](swiftui/observedobject/wrappedvalue.md)
- [ObservedObject.Wrapper](swiftui/observedobject/wrapper.md)
