---
title: FocusedObject
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/focusedobject
---

# FocusedObject

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

## Declaration

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

## Overview

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()](swiftui/focusedobject/init().md)

### Getting the value

- [projectedValue](swiftui/focusedobject/projectedvalue.md)
- [wrappedValue](swiftui/focusedobject/wrappedvalue.md)
- [FocusedObject.Wrapper](swiftui/focusedobject/wrapper.md)

## Relationships

### Conforms To

- [DynamicProperty](swiftui/dynamicproperty.md)

## See Also

### Exposing reference types to focused views

- [focusedObject(_:)](swiftui/view/focusedobject(_:).md)
- [focusedSceneObject(_:)](swiftui/view/focusedsceneobject(_:).md)
