Player2 provides a set of React components for building a feature-rich Spotify music player web application. These components handle everything from dynamic backgrounds to lyrics display and drawer-based navigation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/scoboslor/player2/llms.txt
Use this file to discover all available pages before exploring further.
Core Components
DynamicBackground
Extracts colors from album artwork and creates animated gradient backgrounds that adapt to the currently playing track. View DynamicBackground documentation →LyricsDisplay
Displays synchronized lyrics with auto-scrolling and highlights the current line based on playback progress. View LyricsDisplay documentation →Search
Provides a modal search interface with keyboard shortcuts (Cmd/Ctrl+K) for searching tracks, artists, albums, and playlists. View Search documentation →Drawer Components
A set of drawer components for displaying additional information:- ArtistDrawer - Shows artist details, top tracks, and albums
- QueueDrawer - Displays and manages the playback queue
- DrawerManager - Manages nested drawer state and interactions
Component Architecture
All components are built with:- React - Core UI library
- TypeScript - Type safety and better developer experience
- Framer Motion - Smooth animations and transitions
- Vaul - Drawer/modal functionality
- Spotify Web API SDK - Integration with Spotify
Context Providers
Components rely on these context providers:SpotifyContext- Provides SDK, playback state, and track informationLyricsContext- Manages lyrics visibility stateDrawerContext- Handles drawer state management