<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Namespace",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9NamespaceV"
  },
  "title" : "Namespace"
}
-->

# Namespace

A dynamic property type that allows access to a namespace defined
by the persistent identity of the object containing the property
(e.g. a view).

```
@frozen @propertyWrapper struct Namespace
```

## Topics

### Creating a namespace

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

### Getting the namespace

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

[`Namespace.ID`](/documentation/SwiftUI/Namespace/ID)

A namespace defined by the persistent identity of an
`@Namespace` dynamic property.



---

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)