SwiftUIComponents is a collection of additional shapes, modifiers, and views for SwiftUI and compatible frameworks. It aims to enhance your SwiftUI development experience by providing a variety of reusable components.
- Additional shapes: Discover a collection of custom shapes that you can use in your SwiftUI projects.
- Modifiers: Extend the functionality of SwiftUI views with a set of useful modifiers.
- Custom views: Access a range of pre-built views that can be easily integrated into your SwiftUI layouts.
- Examples: Explore various examples and use cases to see the components in action.
SwiftUIComponents is available as a Swift Package and can be easily integrated into your projects. Simply add the package repository URL to your Xcode project or use the Swift Package Manager.
- In Xcode, select your project or workspace.
- Go to the "Swift Packages" tab.
- Click the "+" button to add a new package.
- Enter the repository URL:
https://github.com/shial4/SwiftUIComponents.git
- Choose the desired version or branch.
- Click "Next" and follow the prompts to complete the integration.
Once you have integrated SwiftUIComponents into your project, you can start using the additional shapes, modifiers, and views provided by the package. Import the module in your code and begin leveraging the components in your SwiftUI views.
import SwiftUIComponents
struct ContentView: View {
@State var currentDate = Date()
@State var selectedDates: ClosedRange<Date>? = nil
let calendar: Calendar = Calendar.current
var body: some View {
CalendarView(date: $currentDate, selection: $selectedDates, calendar: calendar)
}
}
To see SwiftUIComponents in action and explore different use cases, check out the examples provided in the Examples/ViewExamples
directory of this repository. Each example demonstrates how to use specific components and showcases their capabilities.
Comprehensive documentation for SwiftUIComponents can be found in the Docs
directory of this repository. It provides detailed information about each component, including usage instructions, available modifiers, and examples.
SwiftUIComponents supports the following platforms and their respective minimum versions:
- macOS (version 13 and above)
- iOS (version 16 and above)
- Tokamak (hopefully soon)
Contributions to SwiftUIComponents are welcome! If you find a bug, have a feature request, or want to contribute improvements or new components, please open an issue or submit a pull request. Make sure to follow the contribution guidelines outlined in the repository.
- Thanks to the Antoine van der Lee for blog on "Creating a Conditional View Modifier extension"
- Thanks to the fivestars blog for article on "How to apply a reverse mask in SwiftUI"
- Thanks to the kontiki for Custom RoundedCorners Shape
SwiftUI is a trademark owned by Apple Inc. Software maintained as a part of this project is not affiliated with Apple Inc.
SwiftUIComponents is released under the MIT License. See the LICENSE file for details.