Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
😜 CMOneBorderBox 😜
Simple and well-designed Box View Modifier for SwiftUI
🏁 Getting Started
Requirements
- Xcode 11+
- SwiftUI
- iOS 14+
- macOS 10.15+
Installaion
Swift Package Manager(SPM)
File ➜ Swift Packages ➜ Add Package Dependancy..
.package(url: "https://github.com/CM-Material/CMBorderBox", from: "1.0.0")
🎈Usage
CMBorderBox(edge: Edge.Set, color: Color, width: CGFloat, cornerRadius: CGFloat)
// or
someView.CMBorderBox()
edge
: where to put the bordrcolor
: accent color of the borderwidth
: Width of the bordercornerRadius
: Corner radius of the box.
Example
👶 Simple
import CMOneBorderBox
struct ContentView: View {
var body: some View {
Text("Hello, World!").CMOneBorderBox()
}
}
Result
🎨 Accent Color
import CMOneBorderBox
struct ContentView: View {
var body: some View {
Text("Hello, World!").CMOneBorderBox(color: Color.orange)
}
}
Result
🧰 Custom Usage
import CMOneBorderBox
struct ContentView: View {
var body: some View {
Text("Hello, World!").CMOneBorderBox(edge: .top, color: Color.red, width: 5, cornerRadius: 0)
}
}
Result
📜 License
CMOneBorderBox is available under the MIT license. See the LICENSE
file for more info.
✍️ Author
- Byun Kyung Min ➜ 🇰🇷@Changemin
Github
link |
Stars: 0 |