<!--
{
  "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/GraphicsContext/GradientOptions/mirror",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15GraphicsContextV15GradientOptionsV6mirrorAEvpZ"
  },
  "title" : "mirror"
}
-->

# mirror

An option that repeats the gradient outside its nominal range,
reflecting every other instance.

```
static var mirror: GraphicsContext.GradientOptions { get }
```

## Discussion

Use this option to cause the gradient to repeat its pattern in
areas that exceed the bounds of its start and end points.
The repetitions alternately reverse the start and end points,
producing a pattern like `0 -> 1`, `1 -> 0`, `0 -> 1`, and so on.

Without either this option or [`repeat`](/documentation/SwiftUI/GraphicsContext/GradientOptions/repeat), the gradient stops at
the end of its range. This option takes precendence if
you set both this one and [`repeat`](/documentation/SwiftUI/GraphicsContext/GradientOptions/repeat).

---

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)