explaingit

juanpe/skeletonview

12,872SwiftAudience · developerComplexity · 2/5Setup · easy

TLDR

A Swift library for iOS that shows shimmering placeholder animations where content will load, replacing blank screens while your app fetches data.

Mindmap

mindmap
  root((SkeletonView))
    What it does
      Loading placeholders
      Shimmer animations
      Recursive display
    Visual styles
      Solid gray
      Gradient
      Animated shimmer
    Setup
      CocoaPods
      Carthage
      Swift Package Manager
    UI Support
      UITableView
      UICollectionView
      Interface Builder
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Show loading placeholders in any iOS app while fetching data from an API.

USE CASE 2

Add shimmer animations to table views and collection views without extra code per cell.

USE CASE 3

Customize skeleton colors and gradients to match your app's brand.

USE CASE 4

Let designers mark skeleton views visually in Interface Builder without writing code.

Tech stack

SwiftUIKitCocoaPodsCarthageSwift Package Manager

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

SkeletonView is a Swift library for iOS that shows placeholder loading animations while your app fetches content. You have likely seen this effect in apps like Facebook: instead of a blank screen or a spinning wheel, gray or shimmering shapes appear in the layout to show where text and images will load. SkeletonView provides that effect for any iOS app. Using the library takes three steps: import it, mark whichever views should participate in the skeleton effect by setting a single property, then call a show method when loading starts. You can choose between four visual styles: solid gray (no animation), solid with a pulsing shimmer animation, gradient (a two-color fade), or gradient with animation. Hiding the skeleton when content arrives is a single call as well. The library works with the standard iOS list and grid components (UITableView and UICollectionView), and it handles the skeleton display recursively: if you call the show method on a container view, all the marked child views inside it pick up the skeleton automatically without each one needing a separate call. Colors, gradients, corner radius, and animation speed can all be customized. The library also works with Interface Builder and Storyboards, so designers can mark views as skeletonable visually without writing code. It runs on both iPhone and iPad. SkeletonView can be installed via CocoaPods, Carthage, or Swift Package Manager. The project is open source and available in multiple translated READMEs for Spanish, Chinese, Portuguese, Korean, French, and German audiences.

Copy-paste prompts

Prompt 1
Using SkeletonView in Swift, show me how to add a shimmering skeleton loading effect to a UITableView while fetching user data from an API.
Prompt 2
Write Swift code using SkeletonView to apply a gradient skeleton animation to a UICollectionView, then hide it when images finish loading.
Prompt 3
How do I install SkeletonView with Swift Package Manager and mark a custom UIView subclass as skeletonable?
Prompt 4
Using SkeletonView, how do I set a custom gradient color and animation speed for skeleton placeholders across my entire iOS app?
Open on GitHub → Explain another repo

← juanpe on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.