# Tarot Card Shuffle Animation in SwiftUI: Make It Feel Real

> By Lawrence Arya, Founder & CEO of VP0. Published 2026-06-10. 10 min read.
> Source: https://vp0.com/blogs/tarot-card-shuffle-animation-swiftui

The shuffle is the ritual, and the ritual is the product. Here is the SwiftUI choreography: stagger, arcs, springs, and an honest draw.

**TL;DR.** A tarot shuffle animation in SwiftUI is choreography over a decided outcome: the model shuffles the 78-card deck instantly with Fisher-Yates, and the animation performs on top, cards scattering, swirling, and regathering with staggered delays, curved paths, and a spring settle, plus a soft riffle sound and one firm haptic. The cascade loop with the user's tap as the stop is the genre's signature, the reveal wants a slow flip and a held beat, and Reduce Motion gets a crossfade ritual of its own. Start the screens from a free VP0 design an agent like Claude Code or Cursor extends from its source page, and keep the draw honest: the animation never edits fate.

## Why the shuffle is the product

In a tarot app, the shuffle animation is the ritual, and the ritual is most of the product. A [tarot deck](https://en.wikipedia.org/wiki/Tarot) is 78 cards with centuries of ceremony around handling them, and people who come to a digital deck are not looking for a random number generator with art; they are looking for the felt experience of cards being mixed, cut, and drawn. The market takes that experience seriously, the astrology app [Co-Star raised a $15 million Series A](https://en.wikipedia.org/wiki/Co-Star) on the strength of mood and ritual as product, and in this genre the shuffle screen is the moment users judge whether the app understands what it is for.

That premise changes the engineering priorities. The shuffle does not need to be fast; it needs to be convincing, with weight, stagger, and a rhythm that invites the user to slow down. A utility app earns trust by saving time; a ritual app earns it by spending time well, and the build below is organized around that inversion.

## Separate the shuffle from the show

The first structural decision: the randomness and the animation are two systems, and they must not be entangled. The actual ordering of the deck is one line of logic, a [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle) producing an unbiased permutation of the 78 cards, done instantly and invisibly. The animation is theater layered on top, cards visually swirling and regathering while the order is already decided underneath.

This split is also where the genre's honesty lives. The cards shown must be the cards drawn from that unbiased shuffle, never reordered afterward for engagement, no quietly weighting dramatic cards because they drive shares. An entertainment app earns its framing by actually being the fair version of the ritual it digitizes, and the architecture enforces it: the model shuffles once, the view performs, and nothing downstream edits fate. Keeping the two systems separate also makes both testable, the permutation by assertion, the performance by eye.

## Choreographing the shuffle in SwiftUI

The animation itself is a composition of small, ordinary pieces from [SwiftUI's animation system](https://developer.apple.com/documentation/swiftui/animation): each card is a view with its own offset, rotation, and z-position, and the shuffle is a sequence of states those properties animate between, scatter, swirl, regather, square up. The convincing versions share three traits. Stagger: cards never move in unison, each gets a small delay and duration jitter, because simultaneous motion reads as a block sliding, not cards mixing. Arcs: cards travel curved paths with a little 3D rotation, since straight-line slides look like UI, not paper. And spring physics on the regather, with a soft overshoot as the deck squares up, which is where the weight lives.

Sound and haptics carry half the illusion. A soft riffle texture under the scatter and a single firm haptic as the deck lands give the hands and ears what the eyes are being told, and both must be subtle, one notch above silence, because the genre's mood is hushed. Add a settle beat after the regather, a half second where nothing moves before the deck offers itself for the cut, and the rhythm starts to feel dealt rather than rendered.

## The three shuffle styles

| Style | What the user sees | The work |
| --- | --- | --- |
| Cascade loop | Cards stream in a continuous loop until the user stops them | Medium; the stop moment doubles as intention-setting |
| Scatter and regather | Deck bursts apart, swirls, and reforms | Medium; the spring regather carries the feel |
| Fan, cut, and stack | Deck fans out, user cuts, halves restack | Higher; interactive, closest to physical ritual |

The cascade loop has become the genre's signature because the stop is the user's act: cards flow until they tap, and that tap feels like choosing a moment, which is exactly the agency the ritual wants. Scatter-and-regather is the cinematic option for a one-tap shuffle. The fan-and-cut is the most physical and the most work, and it borrows directly from the card-physics craft of a [swipe-driven card UI](/blogs/dating-app-swipe-ui-components/). Whichever style leads, the screen around it, deck, prompt, history, comes shaped as a free [VP0](https://vp0.com) design whose machine-readable source page an agent like Claude Code or Cursor extends from a pasted link, while you tune the choreography no template can feel for you.

## From shuffle to draw: the reveal

The draw is the second act, and it deserves the same care. The classic sequence: the shuffled deck fans into an arc, the user drags a finger across it, cards lifting slightly under the touch, and stops on one, which slides out face-down, floats to center, and flips. SwiftUI's [matchedGeometryEffect](https://developer.apple.com/documentation/swiftui/view/matchedgeometryeffect(id:in:properties:anchor:issource:)) is the natural tool for the card's journey from fan to center, keeping one visual identity as it changes place and size, and the flip is a rotation with a midpoint swap from card back to card face.

Pacing rules the reveal. The flip wants to be slow, most of a second, with the face easing in, because this is the payoff the whole ritual built toward, and a snappy flip spends that tension for nothing. The same page-turning patience as the [page curl animation](/blogs/apple-books-page-curl-turn-animation-swiftui/) applies: the gesture is the meaning, so the animation must give it time to mean. After the flip, hold, let the user look, and only then float in the card's name and meaning.

## Respect, performance, and the quiet parts

Reduce Motion is non-negotiable in a product that is mostly motion: when the setting is on, the shuffle becomes a brief crossfade and the deck simply presents itself, with the sound and haptic carrying the ritual instead. The honest-entertainment line belongs in the quiet parts too, the app presents itself as reflection and entertainment, not prediction, which keeps both the experience and the App Store conversation clean, the same framing the [astrology app template](/blogs/astrology-tarot-reading-app-template-ai/) leans on.

Performance is mostly discipline about layers. Seventy-eight animated card views with shadows is the worst case; the shuffle should animate a working set, the visible dozen or two, with the rest implied, and shadows should be cheap, pre-rendered into the card art rather than computed per frame. Card faces are static images, so they load once and the animation moves textures, not layouts. Test on an older device with the full deck, because the difference between hypnotic and janky is one dropped frame in the regather.

## Common mistakes when vibe coding the shuffle

The recurring one is uniformity: an agent animates all cards with the same duration, delay, and path, producing a deck that moves like one rigid object. The fix lives in the prompt, per-card jitter on delay and duration, curved paths, never unison, because agents reproduce the mechanical version of any animation unless the brief demands variance.

Three more show up. The randomness gets wired into the animation, deck order decided by where cards visually land, which makes the shuffle untestable and the draw suspect; insist on the model-shuffles-first split. The card art arrives as one massive texture atlas decoded during the first shuffle, stuttering exactly at the moment of maximum attention, so preload the deck before the screen appears. And the loop never idles, the cascade running at full visual volume forever, when it should calm after a few seconds, cards slowing, inviting the tap, because an animation that never breathes reads as a screensaver rather than an invitation.

## Key takeaways: a tarot shuffle in SwiftUI

- **The ritual is the product.** Convincing beats fast; spend the time well.
- **Shuffle and show are separate systems.** Fisher-Yates decides instantly; the animation performs on top; nothing edits fate afterward.
- **Variance makes it real.** Staggered delays, curved paths, spring regather, one firm haptic.
- **The reveal is the payoff.** Slow flip, a held beat, then the meaning.
- **Start the screens from a free VP0 design.** The deck, prompt, and history arrive shaped; you tune the choreography.

## What to build

Build the cascade loop with the user's tap as the stop, the model shuffling via Fisher-Yates the moment the screen loads, and the scatter-regather choreography reserved for the first shuffle of a session, where the drama earns its cost. Keep the reveal slow and the sound one notch above silence, honor Reduce Motion with a crossfade ritual, and preload the deck art before the curtain rises. Start from a free VP0 design for the screens and let your agent extend them from the source page, then spend your own taste on the timing curves, because they are the difference between a deck and a gimmick. If your app is a quick-utility reading widget rather than a ritual space, skip the long shuffle entirely, a brief riffle and an honest draw serve that product better, and save the ceremony for the apps built to hold it.

## Frequently asked questions

**How do I build a tarot card shuffle animation in SwiftUI?** Treat it as choreography over a decided outcome: shuffle the 78-card deck instantly with Fisher-Yates in the model, then animate each card as its own view through scatter, swirl, and regather states with staggered delays, curved paths, and a spring settle. Add a soft riffle sound and one firm haptic on the landing, and let the loop calm after a few seconds to invite the stop. A free VP0 design supplies the deck screen an agent extends while you tune the timing.

**Should the animation determine which cards are drawn?** No. The deck order comes from an unbiased shuffle in the model, decided before the animation begins, and the show performs on top of it. Entangling the two makes the logic untestable and tempts the worst habit in the genre, nudging outcomes for drama. The fair version is also the simpler one: one line of Fisher-Yates, a testable permutation, and an animation free to be pure theater because it decides nothing.

**How do I make the card flip reveal feel right?** Slow it down and hold the beat. Move the chosen card from fan to center with matchedGeometryEffect so it keeps one identity, flip it over most of a second with the face easing in, then pause and let the user look before any text arrives. The flip is the payoff the ritual built toward, so a snappy reveal wastes the tension. Reserve the drama for one card; a three-card spread reveals in sequence, each with its own breath.

**What happens to a shuffle animation when Reduce Motion is on?** The ritual stays; the motion goes. Replace the scatter and cascade with a brief crossfade, the deck simply composing itself, and let the sound and the single haptic carry the ceremony. The reveal becomes a gentle fade instead of a flight and flip. A motion-heavy app that ignores the setting is failing exactly the users who asked it to calm down, and the quiet version, done with the same care, still feels like a ritual rather than an error state.

**Is there a free template for a tarot card app UI?** The screens are the reusable part, the deck view, the spread layout, the card detail, the reading history, and VP0 provides them free: real iOS designs with a machine-readable source page that Claude Code, Cursor, or another agent reads from a pasted link and extends. The shuffle choreography, the timing curves, and the sound are where your own taste goes, layered onto that structure. Frame the product as reflection and entertainment, and keep the draw honest, because the genre's trust is the whole asset.

## Frequently asked questions

### How do I build a tarot card shuffle animation in SwiftUI?

Treat it as choreography over a decided outcome: shuffle the 78-card deck instantly with Fisher-Yates in the model, then animate each card as its own view through scatter, swirl, and regather states with staggered delays, curved paths, and a spring settle. Add a soft riffle sound and one firm haptic on the landing, and let the loop calm after a few seconds to invite the stop. A free VP0 design supplies the deck screen an agent extends while you tune the timing.

### Should the animation determine which cards are drawn?

No. The deck order comes from an unbiased shuffle in the model, decided before the animation begins, and the show performs on top of it. Entangling the two makes the logic untestable and tempts the worst habit in the genre, nudging outcomes for drama. The fair version is also the simpler one: one line of Fisher-Yates, a testable permutation, and an animation free to be pure theater because it decides nothing.

### How do I make the card flip reveal feel right?

Slow it down and hold the beat. Move the chosen card from fan to center with matchedGeometryEffect so it keeps one identity, flip it over most of a second with the face easing in, then pause and let the user look before any text arrives. The flip is the payoff the ritual built toward, so a snappy reveal wastes the tension. Reserve the drama for one card; a three-card spread reveals in sequence, each with its own breath.

### What happens to a shuffle animation when Reduce Motion is on?

The ritual stays; the motion goes. Replace the scatter and cascade with a brief crossfade, the deck simply composing itself, and let the sound and the single haptic carry the ceremony. The reveal becomes a gentle fade instead of a flight and flip. A motion-heavy app that ignores the setting is failing exactly the users who asked it to calm down, and the quiet version, done with the same care, still feels like a ritual rather than an error state.

### Is there a free template for a tarot card app UI?

The screens are the reusable part, the deck view, the spread layout, the card detail, the reading history, and VP0 provides them free: real iOS designs with a machine-readable source page that Claude Code, Cursor, or another agent reads from a pasted link and extends. The shuffle choreography, the timing curves, and the sound are where your own taste goes, layered onto that structure. Frame the product as reflection and entertainment, and keep the draw honest, because the genre's trust is the whole asset.

---
*Published on the [VP0 Journal](https://vp0.com/blogs). Free to read, index and cite with attribution.*
