<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Subview",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI7SubviewV"
  },
  "title" : "Subview"
}
-->

# Subview

An opaque value representing a subview of another view.

```
nonisolated struct Subview
```

## Overview

Access to a `Subview` can be obtained by using `ForEach(subviews:)` or
`Group(subviews:)`.

Subviews are proxies to the resolved view they represent, meaning
that modifiers applied to the original view will be applied before
modifiers applied to the subview, and the view is resolved
using the environment of its container, *not* the environment of the
its subview proxy. Additionally, because subviews must represent a
single leaf view, or container, a subview may represent a view after the
application of styles. As such, attempting to apply a style to it may
have no affect.

## Relationships

### Conforms To

[`View`](/documentation/SwiftUI/View)

[`Identifiable`](/documentation/Swift/Identifiable)

---

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)