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

# repeat

An option that repeats the gradient outside its nominal range.

```
static var `repeat`: 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 use the same start and end value for each
repetition.

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

---

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)