<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EmptyContent",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12EmptyContenta"
  },
  "title" : "EmptyContent"
}
-->

# EmptyContent

Content which contains nothing.

```
typealias EmptyContent = EmptyView
```

## Discussion

You will rarely, if ever, need to create an `EmptyContent` directly.
Instead, `EmptyContent` represents the absence of content.

This type should be conformed to builder DSL protocols to represent empty
content in that DSL.

DSLs should use `EmptyContent` in situations where a content type defines
one or more children with generic parameters, and allows the child content
to be absent. When absent, the child content’s type in the generic type
parameter is `EmptyContent`. `ContentBuilder` also returns `EmptyContent`
from `buildBlock()`.

`EmptyContent` defines a `body` property of type `Never` to improve the
ergonomics of conforming to multiple DSL protocols, which should all use
`Never` as the universal “primitive body” type.

---

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)