diff --git a/package.json b/package.json index b93fd03b7..ef833e899 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "downloadjs": "^1.4.7", "file-saver": "^2.0.5", "firebase": "9.9.0", + "framer-motion": "^11.18.2", "git-repo-api": "^0.0.17", "graphql": "^16.8.1", "highlight.js": "^11.9.0", diff --git a/src/plays/dj-motion-cards/README.md b/src/plays/dj-motion-cards/README.md new file mode 100644 index 000000000..56f9784b5 --- /dev/null +++ b/src/plays/dj-motion-cards/README.md @@ -0,0 +1,76 @@ +# ๐ŸŽง DJ Motion Cards + +An animated DJ profile cards component built with **React**, **Tailwind CSS**, and **Framer Motion** โ€” inspired by modern Electronic Press Kits (EPKs) for DJs and music creators. +It demonstrates smooth motion effects, clean visual hierarchy, and interactive elements that respond elegantly to user hover actions. + +--- + +## ๐Ÿงฉ Play Information + +- **Language:** TypeScript +- **Style:** CSS (Tailwind utility classes) +- **Difficulty:** Beginner +- **Play Type:** Animation / UI Design + +--- + +## ๐Ÿ‘จโ€๐ŸŽค Creator Information + +- **User:** ivandiaz333 +- **GitHub:** [@ivandiaz333](https://github.com/ivandiaz333) +- **Video Demo:** _(optional)_ +- **Blog/Portfolio:** _(optional)_ + +--- + +## โš™๏ธ Implementation Details + +This Play presents a **modern DJ profile card** featuring hover animations and glowing transitions using Framer Motion. +It illustrates how motion and layout can combine to create visually engaging UI components. + +### โœจ Key Features + +- Animated image rotation and scale on hover. +- Pulsating soundwave bars for rhythmic motion. +- Smooth easing and transition timing. +- Fully responsive layout built with Tailwind CSS. + +### ๐Ÿ› ๏ธ Technologies Used + +- **React 18** +- **TypeScript** +- **Tailwind CSS** +- **Framer Motion** + +--- + +## ๐Ÿ’ก Notes & Considerations + +- Focused on **UI aesthetics and motion principles**, not backend logic. +- All images are local assets for demo purposes (not fetched externally). +- You can replace the images or modify Tailwind classes to adapt the look. + +--- + +## ๐Ÿง  Learn More + +- [Framer Motion Documentation](https://www.framer.com/motion/) +- [Tailwind CSS Documentation](https://tailwindcss.com/docs) +- [React Play Contributor Guide](https://docs.reactplay.io/) + +--- + +## ๐Ÿ“ท Preview + +_Include a screenshot or GIF here (optional but recommended)._ + +--- + +## ๐Ÿš€ How to Run Locally + +1. Clone the React Play repository and install dependencies: + ```bash + git clone https://github.com/reactplay/react-play.git + cd react-play + npm install + ``` diff --git a/src/plays/dj-motion-cards/axwell.jpg b/src/plays/dj-motion-cards/axwell.jpg new file mode 100644 index 000000000..f4b6fd8b8 Binary files /dev/null and b/src/plays/dj-motion-cards/axwell.jpg differ diff --git a/src/plays/dj-motion-cards/deadmau5.jpg b/src/plays/dj-motion-cards/deadmau5.jpg new file mode 100644 index 000000000..6a412a8a0 Binary files /dev/null and b/src/plays/dj-motion-cards/deadmau5.jpg differ diff --git a/src/plays/dj-motion-cards/dj.jpg b/src/plays/dj-motion-cards/dj.jpg new file mode 100644 index 000000000..86d715e8b Binary files /dev/null and b/src/plays/dj-motion-cards/dj.jpg differ diff --git a/src/plays/dj-motion-cards/index.tsx b/src/plays/dj-motion-cards/index.tsx new file mode 100644 index 000000000..37fc660f3 --- /dev/null +++ b/src/plays/dj-motion-cards/index.tsx @@ -0,0 +1,288 @@ +import React, { useState } from 'react'; +import PlayHeader from 'common/playlists/PlayHeader'; +import { motion } from 'framer-motion'; +import djImage from './james-hype.jpg'; +import djImage2 from './axwell.jpg'; +import djImage3 from './swedish-house-mafia.jpg'; +import djImage4 from './deadmau5.jpg'; +import './styles.css'; + +// Interfaz para tipar los datos de cada DJ +interface SpotifyTrack { + id: string; + url: string; + title: string; +} + +interface DJData { + id: number; + name: string; + country: string; + image: string; + tracks: SpotifyTrack[]; + colorTheme: { + button: string; + buttonHover: string; + soundWaves: string; + }; +} + +// Componente DJCard reutilizable +interface DJCardProps { + dj: DJData; +} + +function DJCard({ dj }: DJCardProps) { + const [flipped, setFlipped] = useState(false); + + return ( + + {/* FRONT SIDE */} + + + +

{dj.name}

+

{dj.country}

+ + + {[...Array(5)].map((_, i) => ( + + ))} + + + setFlipped(true)} + > + My Favourite Tracks โ†’ + +
+ + {/* BACK SIDE */} + +

Top Tracks ๐ŸŽง

+ +
+ {dj.tracks.map((track) => ( +