SwiftUI cards
Cards with depth and gesture physics: a swipeable card stack, a 3D flip card, a card that tilts with the device, and a parallax image card.
About these pieces
One self-contained Swift file each, Apple frameworks only, from iOS 17.
Swipe Deck is a gesture-driven card stack: the top card follows the finger and swings from its base, an outcome badge fades in for the direction you are heading, and a flick throws it left, right or up while the cards beneath rise. Flip Card turns by tap or by a sideways drag that scrubs the rotation, lifting toward you mid-turn.
Motion Card tilts with the device's attitude through Core Motion, with a sheen and shadow that slide as it turns, and stops listening whenever the scene is not active. Parallax Card lets its image drift slower than the scroll while its caption block drifts slower still, so the card reads in layers.
Learn the technique: SwiftUI motion guide, SwiftUI cards guide, SwiftUI animations guide.
Questions
How the pieces work, and how to build the same thing yourself. Every piece's page has its full notes.
How do I make a swipeable card stack in SwiftUI?
Stack the cards in a ZStack, attach a DragGesture to the top one, rotate it from a bottom anchor as it moves, and decide the throw from predictedEndTranslation so a flick counts. Swipe Deck does this over any Identifiable array and adds VoiceOver swipe actions.
How do I flip a card in SwiftUI?
Rotate the container with rotation3DEffect around the y axis and swap which face is visible at 90 degrees, rotating the back face 180 degrees so its content is not mirrored. Flip Card also lets a drag scrub the rotation.
Keep browsing
Nearby collections, then every category in the library.
- Lists7Rows, grids and carousels with swipe, drag-to-select, follow-the-latest and completion physics.
- Animations16Springs, gesture physics, transitions and morphs, across every category.
- Media8Photo viewing and cropping, story playback, attachments and link previews.
- Text4Type that reveals, expands, holds pictures and renders as glass.
- Backgrounds2Quiet atmospheres: a Metal silk shader and a touch-reactive dot grid.
- Liquid Glass5Correct iOS 26 Liquid Glass with Material fallbacks.
- Buttons and controls7Buttons and dials with press depth, hold, drag and outcome states.
- Inputs and forms17Tracks, steppers, rails and fields built for the thumb, down to addresses, map pins and signatures.
- Navigation7Floating docks, tracking tabs, stretchy headers and an A to Z index.
- Sheets5Toasts, confirmations, permission moments and guided tours.
- Feedback5Reactions, ratings, status morphs, skeletons and outcomes.
- Motion1Gesture modifiers with real physics.
- Data and charts6Scrubbable charts, rings, streak heatmaps, live stats and odometers.
- AI6Streaming replies, thinking states, prompt chips and answer sources.
- Haptics33Pieces that tick, tap and confirm at the moment that matters.
Ready to build something better?
85 pieces, one file each, yours to keep. Start with the library or see what the whole app looks like.