whatisgithub

What is expanding-collection?

ramotion/expanding-collection — explained in plain English

Analysis updated 2026-06-26

5,520SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

An iOS Swift library that adds a card-expand animation to your app, cards flip open to reveal more detail when tapped, with a smooth transition to a full detail screen and back.

Mindmap

mindmap
  root((repo))
    What it does
      Card expand animation
      Front and back views
    Tech stack
      Swift
      UIKit
    Setup
      CocoaPods
      Carthage
      Or source folder
    Requirements
      iOS 9 or later
      Xcode 9 or later
    Features
      Detail screen transition
      Tap to open and close
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

What do people build with it?

USE CASE 1

Add an animated card collection screen to an iOS app where each card expands on tap to reveal more detail.

USE CASE 2

Build a content browsing view with front-and-back cards that transition into a full detail screen using the included animation.

USE CASE 3

Add a horizontal card carousel with material-design-style peek-and-pop animations to an existing Xcode project.

What is it built with?

SwiftCocoaPodsCarthage

How does it compare?

ramotion/expanding-collectionandrewhartar/arkit-corelocationalin23/lunar
Stars5,5205,5235,571
LanguageSwiftSwiftSwift
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min
Free to use in personal and commercial projects with no restrictions.

So what is it?

ExpandingCollection is an iOS animation library written in Swift that lets you build card-based screens where each card can expand to reveal more detail. The visual style follows material design conventions, giving cards a satisfying peek-and-pop motion when a user taps them. Ramotion, a mobile design agency, created and maintains this library as part of a broader set of open-source UI components. The core idea is a horizontally scrolling collection of cards. Each card has a front view and a back view. In its collapsed state only the front is visible, when the user taps, the card animates open to show the back content. You can put whatever views you like inside both sides. A companion transition carries the user forward to a full detail screen, and a matching back transition returns them to the collection. Setting it up requires iOS 9 or later and Xcode 9 or later. You can add it to your project by dropping in the source folder directly, or by using CocoaPods or Carthage, which are standard iOS dependency managers. Once added, you create a custom collection view cell that inherits from the library's base cell class, wire up a front container view and a back container view through the interface builder, then create a view controller that inherits from the library's expanding view controller class. The README includes code samples for registering cells, handling tap events, and triggering the open-close animation. The library is released under the MIT license, meaning you can use it in personal and commercial projects freely. Ramotion also built an Android version of the same concept in Java, linked from the README. A paid iOS showcase app from Ramotion lets you try this component and others in a live environment before integrating them yourself.

Copy-paste prompts

Prompt 1
Walk me through adding ExpandingCollection to an iOS project with CocoaPods and creating a basic horizontally scrolling card screen.
Prompt 2
Show me how to subclass BasePeekCell and set up the front and back container views in Interface Builder for the ExpandingCollection library.
Prompt 3
Give me the Swift code for a view controller that uses ExpandingCollection to show a list of recipe cards that expand to reveal the ingredients.
Prompt 4
How does the ExpandingCollection transition work when navigating from the card grid to a full detail screen? Show me the push and pop animation code.

Frequently asked questions

What is expanding-collection?

An iOS Swift library that adds a card-expand animation to your app, cards flip open to reveal more detail when tapped, with a smooth transition to a full detail screen and back.

What language is expanding-collection written in?

Mainly Swift. The stack also includes Swift, CocoaPods, Carthage.

What license does expanding-collection use?

Free to use in personal and commercial projects with no restrictions.

How hard is expanding-collection to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is expanding-collection for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.