rit3zh GitHub avatar

expo-coverflow-carousel

rit3zh

一个为 React Native 打造的 iPod 风格 Cover Flow 走马灯组件,具备真实的 3D 透视、实时的 Skia 着色器反射效果以及流畅的手势导航。

Stars

28

7 天增长

暂无数据

Fork 数

4

开放 Issue

0

开源协议

MIT

最近更新

2026-07-08

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它通过实时 Skia 着色器反射和响应式布局引擎,在 React Native 中实现了罕见的真正 3D Cover Flow 效果。

适合谁使用

  • 构建音乐或媒体应用的 React Native 开发者
  • 寻求高级动画 UI 组件的 Expo 开发者
  • 想要实现经典 Cover Flow 交互的移动工程师
  • 探索 React Native 中 3D 变换和着色器的爱好者

典型使用场景

  • 浏览音乐播放器中的专辑封面
  • 以 3D 走马灯形式展示产品图片
  • 为媒体库创建怀旧风格的界面
  • 在 Expo 中演示复杂的手势处理和 3D 动画

项目优势

  • 通过 Reanimated 和透视变换实现真实的 3D 封面旋转与堆叠
  • 实时 Skia 着色器为每个封面生成动态镜像、淡化和模糊的反射
  • 响应式布局根据屏幕宽度自动调整卡片大小、间距和倾斜角度
  • 使用 expo-image 实现高效缓存和流畅的封面加载

使用前须知

  • 依赖多个重型 peer 依赖(Skia、Reanimated、Gesture Handler),增加包体积和复杂性
  • 目前为演示仓库而非可发布的 npm 包,需要手动配置
  • 针对方形封面优化,可能需调整以适应其他宽高比或使用场景

README 快速开始

expo-coverflow-carousel

iPod-style Cover Flow carousel for React Native.

✨ Features

  • 🎠 True Cover Flow perspective — cards rotate on the Y axis and stack in 3D space; the centered cover flattens to face you while its neighbors tilt away
  • 🪞 Live Skia reflections — each cover casts a real mirrored, gradient-faded, blurred reflection rendered by a react-native-skia runtime shader, not a static image
  • 👆 Pan to scroll, tap to select — flick through the deck with momentum, or tap any side cover to spring it to center
  • 📐 Responsive layout engine — card size, spacing, tilt, and reflection height are all derived from screen width (or an explicit size), so it looks right on any device
  • 🖼️ expo-image under the hood — memory-disk caching, transitions, and recycling keys for smooth, flicker-free covers
  • 🧠 TypeScript-first, fully typed surface

⚙️ Installation

git clone https://github.com/rit3zh/expo-coverflow-carousel
cd expo-coverflow-carousel
bun install
bun start -c

Peer dependencies (already wired up in this template):

bun add react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-worklets @shopify/react-native-skia expo-image

🚀 Usage

Wrap your app once with GestureHandlerRootView and SafeAreaProvider, then drop a `` anywhere in the tree.

// app/_layout.tsx
import { Stack } from "expo-router";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";

export default function RootLayout() {
  return (
    
      
        
      
    
  );
}

The simplest possible carousel — a backdrop and a deck of covers:

import { Coverflow } from "@/components";
import { albums } from "@/data/albums";

export function Example() {
  return (
    
      
      
    
  );
}

Preview

https://github.com/user-attachments/assets/23ac1880-5d08-4b67-bfa5-77246213c3ab

The album shape

albums is any array matching the Album interface. Only image_url is required to render a cover — the rest powers your own now-playing UI.

interface Album {
  position: number;
  title: string;
  artists: string;
  album: string;
  image_url: string;
}

Reacting to the active cover

onIndexChange fires whenever the deck settles on a new cov

项目描述

🍣 iPod-style cover-flow carousel.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

TanStack
精选
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web 开发前端框架
14,861
vercel-labs
精选
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

开发者工具代码质量与构建
1,985
Jakubantalik
精选
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI 与机器学习AI 智能体
1,191