<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12ProgressViewV"
  },
  "title" : "ProgressView"
}
-->

# ProgressView

A view that shows the progress toward completion of a task.

```
nonisolated struct ProgressView<Label, CurrentValueLabel> where Label : View, CurrentValueLabel : View
```

## Overview

Use a progress view to show that a task is incomplete but advancing toward
completion. A progress view can show both determinate (percentage complete)
and indeterminate (progressing or not) types of progress.

Create a determinate progress view by initializing a `ProgressView` with
a binding to a numeric value that indicates the progress, and a `total`
value that represents completion of the task. By default, the progress is
`0.0` and the total is `1.0`.

The example below uses the state property `progress` to show progress in
a determinate `ProgressView`. The progress view uses its default total of
`1.0`, and because `progress` starts with an initial value of `0.5`,
the progress view begins half-complete. A “More” button below the progress
view allows people to increment the progress in increments of five percent:

```
struct LinearProgressDemoView: View {
    @State private var progress = 0.5

    var body: some View {
        VStack {
            ProgressView(value: progress)
            Button("More") { progress += 0.05 }
        }
    }
}
```

![A horizontal bar that represents progress, with a More button](images/com.apple.SwiftUI/ProgressView-1-macOS@2x.png)

To create an indeterminate progress view, use an initializer that doesn’t
take a progress value:

```
var body: some View {
    ProgressView()
}
```

![An indeterminate progress view, presented as a spinning set of gray lines](images/com.apple.SwiftUI/ProgressView-2-macOS@2x.png)

You can also create a progress view that covers a closed range of
<doc://com.apple.documentation/documentation/Foundation/Date> values. As long
as the current date is within the range, the progress view automatically
updates, filling or depleting the progress view as it nears the end of the
range. The following example shows a five-minute timer whose start time is
that of the progress view’s initialization:

```
struct DateRelativeProgressDemoView: View {
    let workoutDateRange = Date()...Date().addingTimeInterval(5*60)

    var body: some View {
         ProgressView(timerInterval: workoutDateRange) {
             Text("Workout")
         }
    }
}
```

![A horizontal progress view that shows a bar partially filled with as it](images/com.apple.SwiftUI/ProgressView-3-macOS@2x.png)

### Styling progress views

You can customize the appearance and interaction of progress views by
creating styles that conform to the [`ProgressViewStyle`](/documentation/SwiftUI/ProgressViewStyle) protocol. To set a
specific style for all progress view instances within a view, use the
[`progressViewStyle(_:)`](/documentation/SwiftUI/View/progressViewStyle(_:)) modifier. In the following example, a custom
style adds a rounded pink border to all progress views within the enclosing
[`VStack`](/documentation/SwiftUI/VStack):

```
struct BorderedProgressViews: View {
    var body: some View {
        VStack {
            ProgressView(value: 0.25) { Text("25% progress") }
            ProgressView(value: 0.75) { Text("75% progress") }
        }
        .progressViewStyle(PinkBorderedProgressViewStyle())
    }
}

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 other at 75 percent,](images/com.apple.SwiftUI/ProgressView-4-macOS@2x.png)

SwiftUI provides two built-in progress view styles,
[`linear`](/documentation/SwiftUI/ProgressViewStyle/linear) and [`circular`](/documentation/SwiftUI/ProgressViewStyle/circular), as well as
an automatic style that defaults to the most appropriate style in the
current context. The following example shows a circular progress view that
starts at 60 percent completed.

```
struct CircularProgressDemoView: View {
    @State private var progress = 0.6

    var body: some View {
        VStack {
            ProgressView(value: progress)
                .progressViewStyle(.circular)
        }
    }
}
```

![A ring shape, filled to 60 percent completion with a blue](images/com.apple.SwiftUI/ProgressView-5-macOS@2x.png)

On platforms other than macOS, the circular style may appear as an
indeterminate indicator instead.

## Topics

### Creating an indeterminate progress view

[`init()`](/documentation/SwiftUI/ProgressView/init())

Creates a progress view for showing indeterminate progress, without a
label.

[`init(label:)`](/documentation/SwiftUI/ProgressView/init(label:))

Creates a progress view for showing indeterminate progress that displays
a custom label.

[`init(_:)`](/documentation/SwiftUI/ProgressView/init(_:)-6k5se)

Creates a progress view for showing indeterminate progress that
generates its label from a localized string.

[`init(_:)`](/documentation/SwiftUI/ProgressView/init(_:)-3q5nf)

Creates a progress view for showing indeterminate progress that
generates its label from a string.

### Creating a determinate progress view

[`init(_:)`](/documentation/SwiftUI/ProgressView/init(_:)-l5vj)

Creates a progress view for visualizing the given progress instance.

[`init(value:total:)`](/documentation/SwiftUI/ProgressView/init(value:total:))

Creates a progress view for showing determinate progress.

[`init(_:value:total:)`](/documentation/SwiftUI/ProgressView/init(_:value:total:))

Creates a progress view for showing determinate progress that generates
its label from a localized string resource.

[`init(value:total:label:)`](/documentation/SwiftUI/ProgressView/init(value:total:label:))

Creates a progress view for showing determinate progress, with a
custom label.

[`init(value:total:label:currentValueLabel:)`](/documentation/SwiftUI/ProgressView/init(value:total:label:currentValueLabel:))

Creates a progress view for showing determinate progress, with a
custom label.

### Create a progress view spanning a date range

[`init(timerInterval:countsDown:)`](/documentation/SwiftUI/ProgressView/init(timerInterval:countsDown:))

Creates a progress view for showing continuous progress as time passes.

[`init(timerInterval:countsDown:label:)`](/documentation/SwiftUI/ProgressView/init(timerInterval:countsDown:label:))

Creates a progress view for showing continuous progress as time passes,
with a descriptive label.

[`init(timerInterval:countsDown:label:currentValueLabel:)`](/documentation/SwiftUI/ProgressView/init(timerInterval:countsDown:label:currentValueLabel:))

Creates a progress view for showing continuous progress as time passes,
with descriptive and current progress labels.



---

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)