Skip to content
Native Animation
Wallet Card Stack animation preview

This preview uses fictional demo content. See the props below for the customization options available in this component.

npx nativeanimation add wallet-card-stack

Wallet Card Stack

A wallet stack whose cards expand into balance and transaction details, with configurable cards, transactions, accent color, and fonts.

$9 for this animation

Add to your project

Copy the component and its assets into your app with the Native Animation CLI, or paste the agent prompt into Claude Code, Codex or Cursor once the MCP server is connected.

About this animation

A wallet stack whose cards expand into balance and transaction details, with configurable cards, transactions, accent color, and fonts.

How it works

  1. onLayout derives every card dimension and vertical position from the component instead of the device window.
  2. One continuous Reanimated progress value drives the full stack, compressed cards, active-card depth, balance reveal, and staggered activity rows.
  3. Tapping any card selects it; tapping it again reverses the current transition, even before opening finishes. A downward pan scrubs the same progress and hands its velocity to the settling spring. Cards retain their original layer order, and the closed pose is flat for every selection. Selecting a different card during a transition first returns the current card to the shared closed pose, then opens the latest requested card.
  4. The active card tilts by up to six degrees while dragging, while a clipped translucent highlight moves inside the card material.
  5. The closed state exposes 64 points of every card and uses the remaining space for the total balance and three recent transactions.
  6. Reduced Motion replaces the spring and tilt with a short fade while preserving every tap target and state.

Why this one

Typical wallet stacks stop at a deck of flat gradients. This one pairs four distinct card materials with an interruptible expansion, useful closed-state account context, realistic merchant history, and a specular response that follows the user's hand. The balance uses a blur-and-lift reveal so financial figures are always crisp at rest.

Install

npx expo install expo-linear-gradient @shopify/react-native-skia react-native-gesture-handler react-native-reanimated react-native-worklets

Wrap the application with GestureHandlerRootView. For web, initialize CanvasKit before loading the component. Icons: Lucide (ISC).

Usage

import { WalletCardStack } from './WalletCardStack';

export function Wallet() {
  return <WalletCardStack />;
}
const walletRef = useRef<WalletCardStackRef>(null);

<WalletCardStack
  ref={walletRef}
  brandName="Aster"
  balance="$4,218.36"
  cards={cards}
  transactions={transactions}
  onCardOpen={(index) => setSelectedCard(index)}
/>

Props

PropTypeDefaultDescription
titlestring'Wallet'Wallet title.
eyebrowstring'PRIVATE ACCOUNT'Small label above the title.
cardsWalletCard[]DEFAULT_CARDSCards in stack order. Supply four for the intended composition.
transactionsWalletTransaction[]DEFAULT_TRANSACTIONSTransactions shown under the active card.
balancestring'$4,218.36'Formatted balance shown in the detail panel.
balanceLabelstring'Available balance'Label above the balance.
brandNamestring'Wallet'Brand wordmark printed on each card.
fontFamilystringundefinedPrimary interface font.
mediumFontFamilystringundefinedMedium interface font.
monoFontFamilystringundefinedMonospaced font used by financial figures.
onCardOpen(index: number) => voidundefinedCalled when a card finishes becoming active.
onCardClose() => voidundefinedCalled when the open card returns to the full stack.
onAddCard() => voidundefinedCalled when the add-card button is pressed.
accessibilityLabelstring'Wallet card stack'Screen-reader label for the stack.
styleStyleProp<ViewStyle>undefinedOptional style for the outer container.
testIDstringundefinedTest identifier for the outer container.
accentColorstring#C4B5FDAccent for the card-count caption.

The ref exposes open(index), close(), and toggle(index).

Compatibility

  • Expo SDK 58
  • React Native 0.88.0
  • Reanimated 4.7.1 and Worklets 0.13.0
  • Skia 2.14.0
  • iOS, Android, and web: supported
  • Expo Go: supported by the SDK 58 bundled modules; use a development build after adding native dependencies elsewhere

Accessibility

Every card and the add action are buttons with descriptive labels and at least a 44-point interaction area. Tapping is a complete alternative to dragging. Reduced Motion removes 3D tilt and replaces the spring with a 190 ms fade transition.

Customization notes

Movement follows gestures, scroll position, or interruptible spring physics. A global duration is not exposed; reduced-motion fades retain their short fixed timing.