ShimmerButton
is a SwiftUI component designed for creating buttons with a shimmering animation. It features customizable text size, background and text colors, border radius, and shimmer duration, offering flexibility for various use-cases.
ShimmerButton.swift
file in your SwiftUI project. File Link
text: String
- The text displayed on the button.textSize: CGFloat
- The size of the text displayed. Default is 20.0
.shimmerDuration: Double
- The duration of the shimmer animation. Default is 3.0
.borderRadius: CGFloat
- The radius of the button’s corners. Default is 30
.backgroundColor: Color
- The background color of the button. Default is .black
.textColor: Color
- The color of the text. Default is .white
.ShimmerButton
component:
ShimmerButton
component: