A customizable SwiftUI button style featuring an Aqua-inspired design. Easily integrate it into your SwiftUI projects for enhanced button appearance.
To use AquaButtonStyle
, apply it to a button with the desired shape and style:
Capsule Button:
Button("Aqua Capsule Button") {
// Button action
}
.fontWeight(.bold)
.aquaButtonStyle(aquaColor: aquaColor)
Rectangle Button:
Button("Aqua Rectangle Button") {
// Button action
}
.fontWeight(.bold)
.aquaButtonStyle(aquaColor: aquaColor, shape: .rectangle(cornerRadius: 15))
This setup demonstrates how to apply the custom button style with either a capsule or rectangle shape.
Color Shadow: To disable the color shadow, set the colorShadow
parameter to false
in the modifier:
.aquaButtonStyle(aquaColor: .blue, colorShadow: false)
For more details, check the code comments in AquaButtonStyle.swift
.