https://github.com/sagarsdagdu/effortratingview
A simple effort rating view in SwiftUI
https://github.com/sagarsdagdu/effortratingview
apple-watch health ios ios-app ios-swift swift swiftui
Last synced: 6 months ago
JSON representation
A simple effort rating view in SwiftUI
- Host: GitHub
- URL: https://github.com/sagarsdagdu/effortratingview
- Owner: SagarSDagdu
- License: mit
- Created: 2024-12-21T08:47:42.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-21T09:04:51.000Z (10 months ago)
- Last Synced: 2025-04-10T23:54:40.191Z (6 months ago)
- Topics: apple-watch, health, ios, ios-app, ios-swift, swift, swiftui
- Language: Swift
- Homepage:
- Size: 12.3 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftUI Effort Rating View
A customizable SwiftUI component for collecting user effort ratings through an interactive bar-based interface. Inspired by Apple Fitness app's workout rating interface, this component provides a familiar and intuitive way for users to rate their effort levels.

## Screenshots
![]()
![]()
![]()
## Features
- Interactive bar-based rating system
- 10 levels of effort across 4 intensity categories
- Animated transitions and selections
- Customizable title
- Responsive layout supporting both portrait and landscape orientations
- Callback support for effort selection## Usage
```swift
struct ContentView: View {
var body: some View {
EffortRatingView(
title: "Rate Your Effort",
onEffortSelected: { intensity, level in
print("Selected \(intensity.rawValue) at level \(level + 1)")
},
onSkip: {
print("Rating skipped")
}
)
}
}
```### Customization Options
- `title`: Customize the view's header text
- `onEffortSelected`: Callback providing selected intensity and level (0-9)## License
This project is available under the MIT license. See the LICENSE file for more info.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin feature/my-new-feature`)
5. Create a new Pull Request