Skip to content
Proyek

saulsharma/apple-music-sheet-ui

Lihat di GitHub

Tentang

Apple Music UI in Expo/React Native

Pengembangan web dan aplikasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • 🎡 Full-screen music player modal with gesture controls
  • πŸ”„ Smooth scaling animations of the root content
  • πŸ‘† Interactive pan gesture handling
  • πŸ“± iOS-style sheet presentation

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
-1
dalam 15 hari
-1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Apple Music Sheet UI Demo with Expo

This project demonstrates an implementation of the Apple Music player UI in React Native using Expo, with a focus on replicating the smooth sheet transitions and scaling animations.

Demo

Features

  • 🎡 Full-screen music player modal with gesture controls
  • πŸ”„ Smooth scaling animations of the root content
  • πŸ‘† Interactive pan gesture handling
  • πŸ“± iOS-style sheet presentation
  • 🎨 Dynamic border radius animations
  • 🌟 Visual audio visualizer
  • πŸ’« Haptic feedback on modal interactions
  • πŸ–ΌοΈ Blur effects and backdrop filters
  • πŸ“± Sticky mini-player navigation
  • πŸ“‹ Apple Music style track listing
  • ⚑ Gesture handling with drag thresholds
  • πŸ”„ Horizontal swipe to dismiss

Tech Stack

Getting Started

  1. Install dependencies:

    npm install
    
  2. Start the development server:

    npx expo start
    
  3. Open in iOS Simulator or Android Emulator:

    • Press i for iOS
    • Press a for Android

Implementation Details

The project showcases several key features of modern React Native development:

  • Shared element transitions between mini and full player
  • Gesture-based interactions with multi-axis support
  • Context-based animation state management
  • Worklet-based animations for optimal performance

Known Issues

  • Horizontal drag gesture conflicts with content scrolling when the modal is partially scrolled, causing flickering. This needs to be addressed by properly managing gesture priorities and scroll state.

Project Structure

project-root/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (tabs)/
β”‚   β”‚   β”œβ”€β”€ search/            # Search and library screens
β”‚   β”‚   β”‚   β”œβ”€β”€ _layout.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ library.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ new.tsx
β”‚   β”‚   β”‚   └── radio.tsx
β”‚   β”‚   β”œβ”€β”€ music/             # Music player routes
β”‚   β”‚   β”‚   β”œβ”€β”€ [id].tsx
β”‚   β”‚   β”‚   └── _layout.tsx
β”‚   β”‚   └── _layout.tsx        # Tab navigation layout
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ navigation/
β”‚   β”‚   └── TabBarIcon.tsx     # Tab bar icons
β”‚   β”œβ”€β”€ Overlay/               # Sheet UI components
β”‚   β”‚   β”œβ”€β”€ OverlayContext.tsx
β”‚   β”‚   β”œβ”€β”€ OverlayProvider.tsx
β”‚   β”‚   └── ThemedView.tsx
β”‚   └── ThemedText.tsx
β”œβ”€β”€ contexts/
β”‚   β”œβ”€β”€ AudioContext.tsx       # Audio playback state
β”‚   └── RootScaleContext.tsx   # Scale animation state
β”œβ”€β”€ constants/
β”‚   └── Colors.ts             # Theme colors
└── hooks/                    # Custom React hooks
    β”œβ”€β”€ useColorScheme.ts
    β”œβ”€β”€ useThemeColor.ts
    └── useColorScheme.web.ts

Contributing

Feel free to contribute to this project by:

  1. Forking the repository
  2. Creating a feature branch
  3. Submitting a pull request

License

This project is open source and available under the MIT License.

Jelajahi proyek terkait

Memuat…