<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/FocusedObject",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13FocusedObjectV"
  },
  "title" : "FocusedObject"
}
-->

# FocusedObject

A property wrapper type for an observable object supplied by the focused
view or one of its ancestors.

```
@MainActor @frozen @propertyWrapper @preconcurrency struct FocusedObject<ObjectType> where ObjectType : ObservableObject
```

## Overview

Focused objects invalidate the current view whenever the observable object
changes. If multiple views publish a focused object using the same key, the
wrapped property will reflect the object that’s closest to the focused view.

## Topics

### Creating the focused object

[`init()`](/documentation/SwiftUI/FocusedObject/init())

Creates a focused object.

### Getting the value

[`projectedValue`](/documentation/SwiftUI/FocusedObject/projectedValue)

A projection of the focused object that creates bindings to its
properties using dynamic member lookup.

[`wrappedValue`](/documentation/SwiftUI/FocusedObject/wrappedValue)

The underlying value referenced by the focused object.

[`FocusedObject.Wrapper`](/documentation/SwiftUI/FocusedObject/Wrapper)

A wrapper around the underlying focused object that can create bindings
to its properties using dynamic member lookup.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)