UIComponents is a Swift Package Manager (SwiftPM) package that provides a collection of SwiftUI elements and design helpers to enhance the development of your SwiftUI-based projects.
-
ImageContentView
-
InputView
-
Toast
-
GenericTextField
-
PrimaryButton
-
ActionButtonStyle
-
FullButtonStyle
-
SocialButtonStyle
-
FullButtonStyle
-
CardModifier
-
ToastView
-
Alert
-
InterfaceError
-
Localization
usingswiftgen
To integrate UIComponents
into your Xcode project, add it as a dependency in your Package.swift
file:
.package(url: "https://github.com/MTD-Technology-Romania/swiftui-components)", from: "1.0.0")
Then, add Components
to your target's dependencies.
.target(
name: "Components",
dependencies: ["Components"]
),
Here's a simple example demonstrating how to use a component from UIComponents in your SwiftUI code:
import Components
struct ContentView: View {
var body: some View {
VStack {
InputView(title: "Email", color: .gray, systemImage: "envelope", inputBackground: .white, inputOverlay: .gray) {
TextField("Enter your email here", text: .constant(""))
.textContentType(.emailAddress)
.keyboardType(.emailAddress)
.foregroundColor(.gray)
}
.padding()
// Add more components as needed
}
}
}
For detailed documentation and examples, refer to the Documentation folder in this repository.
Contributions are welcome! Please follow our Contribution Guidelines.
YourPackageName is available under the MIT license. See the LICENSE file for more info.