Skip to content

d-putra/DShimmer

Repository files navigation

shimmer

A lightweight and customizable shimmer loading view for iOS — built with UIView and SwiftUI support.

✨ Features

  • ✅ Simple API with SwiftUI chaining
  • 🎨 Customizable shimmer color, base color, corner radius
  • 🔁 Dynamic rotation angle (0° to 360°)
  • 🧱 Lightweight and fast — works with both UIKit & SwiftUI

🚀 Usage/Examples

SwiftUI

shimmerview

DShimmerView()
    .baseColor(.lightGray.withAlphaComponent(0.4))
    .shimmerColor(.white.withAlphaComponent(0.3))
    .rotationDegree(20)
    .frame(maxWidth: 140)
    .frame(height: 120)

shimmer2

Button {} label: {
    Text("Button With Text Shimmer")
        .foregroundColor(.white)
        .padding(.horizontal, 12)
        .padding(.vertical, 16)
        .bold()
        .dshimmer(baseColor: .clear, shimmerColor: .gray)
}

UIKit

🛠️ Installation

Swift Package Manager

File > Swift Packages > Add Package Dependency

Cocoapods

Add this to your Podfile :

pod 'DShimmer', :git => 'https://github.com/d-putra/DShimmer.git', :tag => '1.0'

About

DShimmer is A lightweight and customizable shimmer loading view for iOS — built with UIView and SwiftUI support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published