Ring-Swing Card Stack Onboarding
Four pages show colored cards hanging from a metal ring under a serif headline. Tapping the arrow lifts the top card, swings it around the ring and off screen, then it returns edge-on from behind the title and settles at the back with a bounce.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "ring-swing-card-stack-onboarding" to this project. The full source is attached at the end of this prompt. Put the files under components/ring-swing-card-stack-onboarding/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Details
- Platforms
- iOS, Android
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 15 Nov 2026
- License
- Unlimited commercial projects
- Original design
- @oiharshit on X
Are you the designer? Ask us to change or remove this.
Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs
What it does
A four-page onboarding screen with a serif headline, a stack of coloured cards hanging from a metal key ring at the top left, page dots and a round Next button. Tapping the button or the top card lifts the card, slides its hole along the ring and swings it out past the left edge. It then comes back round the ring as a narrow edge-on strip, widens and drops onto the bottom of the stack with a small bounce while the remaining cards step forward. The old headline blurs out as the new one blurs in, and the dots cross-fade. Each top card carries a small looping illustration: a lid that pops off a box, a floating photo pile, a camera that flashes, a sneaker that hops. Taps are ignored briefly during a transition and the last page loops to the first.
How it's built
A shared JavaScript core holds the page data, layout and a frame function that returns every card's position, angle, scale and opacity for a given state and time. The React Native component renders that output with views, images and react-native-svg for the ring, the flash and the arrow, and a requestAnimationFrame clock drives it. The swing is a keyframe track through a hidden segment behind the ring, joined with monotone cubic interpolation. Cards pivot around the hole using translate, rotate and scale lists, because React Native has no transform-origin. The headline blur is two stacked Text layers, one sharp and one that is only a text shadow, so it is an approximation of a real blur.
Good for
- A first-run walkthrough with a few illustrated feature pages
- Collection or wishlist apps that want a card stack with a playful page change
- Any pager where the outgoing item should travel around a fixed anchor and rejoin the pile
Dependencies
react-native-svgreact-native