Shared-Element Card Expand to Audio Player
Pressing the featured card scales it down, and tapping fills the top of the screen with it while home content fades. Play morphs into pause, 37 waveform bars move, and bars turn green as the playhead passes. Uses expo-blur on React Native.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "sharedelement-card-expand-to-audio-player" to this project. The full source is attached at the end of this prompt. Put the files under components/sharedelement-card-expand-to-audio-player/, 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
- 2 Nov 2026
- License
- Unlimited commercial projects
- Original design
- @jenidesignns 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 dark podcast home page with a menu button, a logo, an avatar in a story-style ring, a light green featured card and two show cards below it, over a floating tab bar. The featured card shows a person with headphones in front of a ribbon and carries a frosted bar with title, time left, a progress bar and a play button. The page enters with the card rising, the header dropping and the shows sliding up. Pressing the card shrinks it a little, and tapping it expands it to the top of the screen. The photo scales up, home content fades, back and heart buttons appear, a large headline fades in behind the person and the title row and a waveform card rise in. Play morphs into pause, and 37 bars keep wobbling and recolor as the playhead passes them.
How it's built
A shared core exposes a frame function that returns a display list from a set of drivers, which the React Native component draws with react-native-svg. expo-blur supplies the frosted bar, expo-font loads the display typeface and PanResponder handles the drag and tap. The expansion is a shared-element transition, with the card rectangle interpolating to full width while its content scales with it. The component takes a mode of demo or live, a frozen time for stills, and a flag to skip the intro.
Good for
- Podcast, audiobook or music apps where a card opens into the player
- A featured-content hero that expands into a detail screen
- A waveform progress bar that shows what has been played
Dependencies
expo-blurexpo-fontreact-native-svgreact-native