{"id":15170602,"url":"https://github.com/arnavmotwani/circularprogressswiftui","last_synced_at":"2025-10-25T19:31:00.520Z","repository":{"id":49846006,"uuid":"316708665","full_name":"ArnavMotwani/CircularProgressSwiftUI","owner":"ArnavMotwani","description":"SwiftUI package that creates an animated circular progress bar","archived":false,"fork":false,"pushed_at":"2022-01-08T10:53:43.000Z","size":5881,"stargazers_count":68,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-10T22:42:06.102Z","etag":null,"topics":["2020","indie","ios","macos","package","swift","swift-package-manager","swiftui","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArnavMotwani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"arnavmotwani","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-11-28T10:29:41.000Z","updated_at":"2024-10-07T22:29:55.000Z","dependencies_parsed_at":"2022-07-29T22:39:25.152Z","dependency_job_id":null,"html_url":"https://github.com/ArnavMotwani/CircularProgressSwiftUI","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavMotwani%2FCircularProgressSwiftUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavMotwani%2FCircularProgressSwiftUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavMotwani%2FCircularProgressSwiftUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavMotwani%2FCircularProgressSwiftUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArnavMotwani","download_url":"https://codeload.github.com/ArnavMotwani/CircularProgressSwiftUI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865149,"owners_count":16555931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2020","indie","ios","macos","package","swift","swift-package-manager","swiftui","xcode"],"created_at":"2024-09-27T08:04:11.974Z","updated_at":"2025-10-25T19:30:59.085Z","avatar_url":"https://github.com/ArnavMotwani.png","language":"Swift","funding_links":["https://patreon.com/arnavmotwani"],"categories":[],"sub_categories":[],"readme":"# CircularProgress\n\nSwiftUI package that creates an animated circular progress bar\n\n### Installation: It requires at least iOS 15, iPadOS 15, macOS 12 and Xcode 13!\n\nIn Xcode go to `File -\u003e Add Packages...` and paste in the repo's url: `https://github.com/ArnavMotwani/CircularProgressSwiftUI.git` then either select a version or the main branch\n\nI will update the main branch more frequently with minor changes, while the version will only increase with significant changes.\n\nThere also a branch called iOS13 which supports iOS 13+ and macOS 10_15+\n\n## Usage:\n\nImport the package into the file with  `import CircularProgress`\n\n### Example:\nHere is how the default view, with no customizations, can be implemented\n\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Gifs/example.gif\" width=\"200\" /\u003e\n\u003c/p\u003e\n\n```swift\nimport SwiftUI\nimport CircularProgress\n\nstruct ContentView: View {\n    @State var count = 0\n    let total = 10\n    var progress: CGFloat{\n        return CGFloat(count)/CGFloat(total)\n    }\n    var body: some View {\n        VStack {\n            CircularProgressView(count: count, total: total, progress: progress)\n                .padding(50)\n            HStack{\n                Button(\"Decrease\", action: {self.count -= 1})\n                Spacer()\n                Button(\"Increase\", action: {self.count += 1})\n            }\n            .padding(50)\n        }\n    }\n}\n\n```\n## Fill Customization:\nThe Progress Bar can be filled with a Linear or an Angular Gradient. By default the fill is `LinearGradient(gradient: Gradient(colors: [Color.green, Color.blue]), startPoint: .top, endPoint: .bottom)` however you can pass a custom Linear or Angular Gradient to the fill Parameter.\n\n## Parameters:\n\n| parameter      | optional? | type                              | description                                                                   | default                                                                                                    |\n|----------------|-----------|-----------------------------------|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| count          | required  | Int                               | Current value (larger text in the centre)                                     | -                                                                                                          |\n| total          | required  | Int                               | Total value (smaller text in the centre)                                      | -                                                                                                          |\n| progress       | required  | CGFloat                           | Progress of the bar                                                           | -                                                                                                          |\n| fontOne        | optional  | Font                              | Font of larger text in the centre                                             | Font.system(size: 75, weight: .bold, design: .rounded)                                                     |\n| fontTwo        | optional  | Font                              | Font of smaller text in the centre                                            | Font.system(size: 25, weight: .bold, design: .rounded)                                                     |\n| colorOne       | optional  | Color                             | Color of larger text in the centre                                            | Color.primary                                                                                              |\n| colorTwo       | optional  | Color                             | Color of smaller text in the centre                                           | Color.gray                                                                                                 |\n| fill           | optional  | LinearGradient or AngularGradient | Fill of the progress bar                                                      | LinearGradient(gradient: Gradient(colors: [Color.green, Color.blue]), startPoint: .top, endPoint: .bottom) |\n| lineWidth      | optional  | CGFloat                           | Width of the progress bar                                                     | 25.0                                                                                                       |\n| lineCap        | optional  | CGLineCap                         | The line cap at the end of the progress bar                                   | CGLineCap.round                                                                                            |\n| showText       | optional  | Bool                              | Choose whether the text at the centre is displayed or not                     | true                                                                                                       |\n| showBottomText | optional  | Bool                              | Choose whether the bottom text in the centre is visible (if showText is true) | true                                                                                                       |\n\n### Examples\n\n#### fontOne\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/FontOne.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, fontOne: Font.title.bold())\n```\n---\n#### fontTwo\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/FontTwo.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, fontTwo: Font.title2)\n```\n---\n#### colorOne\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/ColorOne.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, colorOne: Color.blue)\n```\n---\n#### colorTwo\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/ColorTwo.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, colorTwo: Color.blue)\n```\n---\n#### fill\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/Fill.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, fill: LinearGradient(gradient: Gradient(colors: [Color.red, Color.blue]), startPoint: .leading, endPoint: .trailing))\n```\n---\n#### lineWidth\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/LineWidth.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, lineWidth: 50)\n```\n---\n#### lineCap\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/LineCap.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, lineCap: CGLineCap.square)\n```\n---\n#### showText\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/ShowText.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, showText: false)\n```\n---\n#### showBottomText\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./Images/ShowBottomText.png\" /\u003e\n\u003c/p\u003e\n\n```swift\nCircularProgressView(count: count, total: total, progress: progress, showBottomText: false)\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnavmotwani%2Fcircularprogressswiftui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnavmotwani%2Fcircularprogressswiftui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnavmotwani%2Fcircularprogressswiftui/lists"}