<!--
{
  "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/EmptyView",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9EmptyViewV"
  },
  "title" : "EmptyView"
}
-->

# EmptyView

A view that doesn’t contain any content.

```
@frozen nonisolated struct EmptyView
```

## Overview

You will rarely, if ever, need to create an `EmptyView` directly. Instead,
`EmptyView` represents the absence of a view.

SwiftUI uses `EmptyView` in situations where a SwiftUI view type defines one
or more child views with generic parameters, and allows the child views to
be absent. When absent, the child view’s type in the generic type parameter
is `EmptyView`.

The following example creates an indeterminate [`ProgressView`](/documentation/SwiftUI/ProgressView) without
a label. The [`ProgressView`](/documentation/SwiftUI/ProgressView) type declares two generic parameters,
`Label` and `CurrentValueLabel`, for the types used by its subviews.
When both subviews are absent, like they are here, the resulting type is
`ProgressView<EmptyView, EmptyView>`, as indicated by the example’s output:

```
let progressView = ProgressView()
print("\(type(of:progressView))")
// Prints: ProgressView<EmptyView, EmptyView>
```

## Topics

### Creating an empty view

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

Creates an empty view.



---

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)