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

# projectedValue

A projection of the state 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 a state object. To access the projected value, prefix the property name with a dollar sign ($). For example, you can get a binding to a model’s isEnabled Boolean so that a Toggle can control the value: struct MyView: View {     @StateObject private 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/stateobject/wrappedvalue.md)
