<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Visibility",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10VisibilityO"
  },
  "title" : "Visibility"
}
-->

# Visibility

The visibility of a UI element, chosen automatically based on
the platform, current context, and other factors.

```
@frozen enum Visibility
```

## Overview

For example, the preferred visibility of list row separators can be
configured using the [`listRowSeparator(_:edges:)`](/documentation/SwiftUI/View/listRowSeparator(_:edges:)).

## Topics

### Getting visibility options

[`Visibility.automatic`](/documentation/SwiftUI/Visibility/automatic)

The element may be visible or hidden depending on the policies of the
component accepting the visibility configuration.

[`Visibility.visible`](/documentation/SwiftUI/Visibility/visible)

The element may be visible.

[`Visibility.hidden`](/documentation/SwiftUI/Visibility/hidden)

The element may be hidden.



---

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)