<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ProgressView/init(_:)-9dmp3",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12ProgressViewVyACyAA0cD18StyleConfigurationV5LabelVAE012CurrentValueG0VGAEcAGRszAIRs_rlufc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a progress view based on a style configuration.

```
nonisolated init(_ configuration: ProgressViewStyleConfiguration) where Label == ProgressViewStyleConfiguration.Label, CurrentValueLabel == ProgressViewStyleConfiguration.CurrentValueLabel
```

## Discussion

You can use this initializer within the
`ProgressViewStyle/makeBody(configuration:)` method of a
`ProgressViewStyle` to create an instance of the styled progress view.
This is useful for custom progress view styles that only modify the
current progress view style, as opposed to implementing a brand new
style. Because this modifier style can’t know how the current style
represents progress, avoid making assumptions about the view’s contents,
such as whether it uses bars or other shapes.

The following example shows a style that adds a rounded pink border to a
progress view, but otherwise preserves the progress view’s current
style:

```
struct PinkBorderedProgressViewStyle: ProgressViewStyle {
    func makeBody(configuration: Configuration) -> some View {
        ProgressView(configuration)
            .padding(4)
            .border(.pink, width: 3)
            .cornerRadius(4)
    }
}
```

![Two horizontal progress views, one at 25 percent complete and the](images/com.apple.SwiftUI/ProgressView-4-macOS@2x.png)

> Note: Progress views in widgets don’t apply custom styles.

---

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)