├── README.md └── javascript ├── index.html ├── script.js └── style.css /README.md: -------------------------------------------------------------------------------- 1 | 🌈 MoodWave – Interactive Mood Visualizer 2 | 3 | MoodWave is a creative JavaScript-based website that lets users reflect their current mood using animations, quotes, and responsive background gradients. It's designed with HTML5, CSS3, and JavaScript, and focuses on the user’s emotional interaction with the interface. 4 | 5 | ✨ Features 6 | 7 | - 🎭 Dynamic mood selection (Happy, Sad, Anxious, Calm, Excited) 8 | - 💬 Motivational and empathetic quotes for each mood 9 | - 🌈 Animated emoji feedback 10 | - 🎨 Vibrant background color gradients 11 | - 📱 Fully responsive UI 12 | 13 | 💡 How It Works 14 | 15 | 1. The user selects a mood from a dropdown. 16 | 2. JavaScript dynamically updates the quote, emoji visuals, and background style. 17 | 3. Smooth transitions enhance the emotional engagement. 18 | 19 | 🛠️ Tech Stack 20 | 21 | - **HTML5** – Semantic structure and layout 22 | - **CSS3** – Styling, animations, and responsiveness 23 | - **JavaScript (Vanilla)** – DOM manipulation and event-driven logic 24 | 25 | ## 📂 Project Structure 26 | MoodWave/ 27 | │ 28 | ├── index.html # Main HTML file 29 | ├── style.css # Styling and animations 30 | ├── script.js # JavaScript logic 31 | └── README.md # Project documentation 32 | 33 | 34 | 🚀 Live Demo 35 | 36 | You can host this on GitHub Pages or any static site host to see it in action! 37 | 38 | 🧠 Use Cases 39 | 40 | - Mood-based websites 41 | - Mental health journaling tools 42 | - Emotion-driven design experiments 43 | - Frontend learning projects 44 | 45 | 📸 Preview 46 | 47 |  48 | 49 | Feel free to customize the mood types, colors, or add sound effects for a richer experience! 🌟 50 | -------------------------------------------------------------------------------- /javascript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |Select your mood to reflect your inner vibes
13 | 14 | 21 | 22 |How are you feeling today?
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /javascript/script.js: -------------------------------------------------------------------------------- 1 | const moods = { 2 | happy: { 3 | quote: "Happiness is not by chance, but by choice.", 4 | background: "linear-gradient(to right, #f9d423, #ff4e50)", 5 | emojis: ["😊", "😄", "😁"] 6 | }, 7 | sad: { 8 | quote: "Tears come from the heart and not from the brain.", 9 | background: "linear-gradient(to right, #4b6cb7, #182848)", 10 | emojis: ["😢", "😞", "😔"] 11 | }, 12 | anxious: { 13 | quote: "You don't have to control your thoughts. You just have to stop letting them control you.", 14 | background: "linear-gradient(to right, #6a11cb, #2575fc)", 15 | emojis: ["😟", "😰", "😣"] 16 | }, 17 | calm: { 18 | quote: "Calm mind brings inner strength and self-confidence.", 19 | background: "linear-gradient(to right, #00c9ff, #92fe9d)", 20 | emojis: ["😌", "🧘♂️", "🌿"] 21 | }, 22 | excited: { 23 | quote: "Excitement is the more practical synonym for happiness.", 24 | background: "linear-gradient(to right, #fc00ff, #00dbde)", 25 | emojis: ["🤩", "😆", "🎉"] 26 | } 27 | }; 28 | 29 | const moodSelector = document.getElementById("mood-selector"); 30 | const quoteElement = document.getElementById("quote"); 31 | const emojiContainer = document.getElementById("emoji-container"); 32 | const body = document.body; 33 | 34 | moodSelector.addEventListener("change", () => { 35 | const selected = moodSelector.value; 36 | const mood = moods[selected]; 37 | 38 | body.style.background = mood.background; 39 | 40 | quoteElement.style.opacity = 0; 41 | setTimeout(() => { 42 | quoteElement.textContent = mood.quote; 43 | quoteElement.style.opacity = 1; 44 | }, 300); 45 | 46 | emojiContainer.innerHTML = ""; 47 | mood.emojis.forEach((emoji, i) => { 48 | const span = document.createElement("span"); 49 | span.textContent = emoji; 50 | span.style.margin = "10px"; 51 | span.style.animationDelay = `${i * 0.3}s`; 52 | emojiContainer.appendChild(span); 53 | }); 54 | }); 55 | -------------------------------------------------------------------------------- /javascript/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | body { 8 | font-family: 'Poppins', sans-serif; 9 | height: 100vh; 10 | background: linear-gradient(to bottom, #dfe9f3, #ffffff); 11 | display: flex; 12 | flex-direction: column; 13 | align-items: center; 14 | justify-content: center; 15 | text-align: center; 16 | transition: background 1s ease-in-out; 17 | } 18 | 19 | h1 { 20 | font-size: 3rem; 21 | color: #333; 22 | margin-bottom: 10px; 23 | } 24 | 25 | .description { 26 | font-size: 1.2rem; 27 | color: #666; 28 | margin-bottom: 30px; 29 | } 30 | 31 | select { 32 | padding: 12px 20px; 33 | font-size: 1.2rem; 34 | border-radius: 10px; 35 | border: 2px solid #999; 36 | background: #fff; 37 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 38 | } 39 | 40 | #quote { 41 | margin-top: 30px; 42 | font-size: 1.5rem; 43 | font-style: italic; 44 | max-width: 80%; 45 | color: #444; 46 | transition: opacity 0.5s ease-in-out; 47 | } 48 | 49 | #emoji-container span { 50 | display: inline-block; 51 | font-size: 2.5rem; 52 | animation: float 3s ease-in-out infinite; 53 | } 54 | 55 | @keyframes float { 56 | 0% { transform: translateY(0); opacity: 1; } 57 | 50% { transform: translateY(-15px); opacity: 0.7; } 58 | 100% { transform: translateY(0); opacity: 1; } 59 | } 60 | 61 | footer { 62 | position: absolute; 63 | bottom: 15px; 64 | font-size: 0.9rem; 65 | color: #999; 66 | } 67 | --------------------------------------------------------------------------------