<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/AlternatingRowBackgroundBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI32AlternatingRowBackgroundBehaviorV"
  },
  "title" : "AlternatingRowBackgroundBehavior"
}
-->

# AlternatingRowBackgroundBehavior

The styling of views with respect to alternating row backgrounds.

```
struct AlternatingRowBackgroundBehavior
```

## Overview

Use values of this type with the [`alternatingRowBackgrounds(_:)`](/documentation/SwiftUI/View/alternatingRowBackgrounds(_:))
modifier.

## Topics

### Getting alternating row background behavior

[`static let automatic: AlternatingRowBackgroundBehavior`](/documentation/SwiftUI/AlternatingRowBackgroundBehavior/automatic)

The automatic alternating row background behavior.

[`static let enabled: AlternatingRowBackgroundBehavior`](/documentation/SwiftUI/AlternatingRowBackgroundBehavior/enabled)

Alternating rows will be enabled for applicable views.

[`static let disabled: AlternatingRowBackgroundBehavior`](/documentation/SwiftUI/AlternatingRowBackgroundBehavior/disabled)

Alternating rows will be disabled for applicable views.

## Relationships

### Conforms To

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

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

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

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

---

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)