Real Estate Packages Slider Template
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Luxury Estates | Premium Properties</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="container"> <header class="main-header animate-in"> <div> <h1 class="logo">LUXURY ESTATES</h1> <p class="header-tagline">Premium Properties Worldwide</p> </div> </header> <div class="slider-wrapper"> <!-- Slide 1 --> <div class="slide active"> <img src="https://images.unsplash.com/photo-1613490493576-7fde63acd811?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80" alt="Modern Villa" class="slide-image"> <div class="slide-counter">01</div> <div class="slide-content"> <div class="property-price">$1,250,000</div> <h2 class="property-title">Modern Luxury Villa</h2> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> <span>Malibu, California</span> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> <span>5 Bedrooms</span> </div> <div class="feature"> <i class="fas fa-bath"></i> <span>6 Bathrooms</span> </div> <div class="feature"> <i class="fas fa-ruler-combined"></i> <span>4,500 sq ft</span> </div> <div class="feature"> <i class="fas fa-swimming-pool"></i> <span>Infinity Pool</span> </div> </div> </div> <button class="details-toggle"> <i class="fas fa-info"></i> </button> </div> <!-- Slide 2 --> <div class="slide"> <img src="https://images.unsplash.com/photo-1613977257363-707ba9348227?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80" alt="Penthouse" class="slide-image"> <div class="slide-counter">02</div> <div class="slide-content"> <div class="property-price">$890,000</div> <h2 class="property-title">Downtown Penthouse</h2> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> <span>Manhattan, New York</span> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> <span>3 Bedrooms</span> </div> <div class="feature"> <i class="fas fa-bath"></i> <span>3.5 Bathrooms</span> </div> <div class="feature"> <i class="fas fa-ruler-combined"></i> <span>2,800 sq ft</span> </div> <div class="feature"> <i class="fas fa-warehouse"></i> <span>Private Garden</span> </div> </div> </div> <button class="details-toggle"> <i class="fas fa-info"></i> </button> </div> <!-- Slide 3 --> <div class="slide"> <img src="https://images.unsplash.com/photo-1613977257592-4871e5fcd7c4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80" alt="Lakeside Estate" class="slide-image"> <div class="slide-counter">03</div> <div class="slide-content"> <div class="property-price">$2,350,000</div> <h2 class="property-title">Lakeside Modern Estate</h2> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> <span>Lake Tahoe, Nevada</span> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> <span>6 Bedrooms</span> </div> <div class="feature"> <i class="fas fa-bath"></i> <span>7 Bathrooms</span> </div> <div class="feature"> <i class="fas fa-ruler-combined"></i> <span>6,200 sq ft</span> </div> <div class="feature"> <i class="fas fa-water"></i> <span>Private Beach</span> </div> </div> </div> <button class="details-toggle"> <i class="fas fa-info"></i> </button> </div> <!-- Slide 4 --> <div class="slide"> <img src="https://images.unsplash.com/photo-1616587226154-91eab0a51dc7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80" alt="Mountain Retreat" class="slide-image"> <div class="slide-counter">04</div> <div class="slide-content"> <div class="property-price">$1,750,000</div> <h2 class="property-title">Mountain Retreat</h2> <div class="property-location"> <i class="fas fa-map-marker-alt"></i> <span>Aspen, Colorado</span> </div> <div class="property-features"> <div class="feature"> <i class="fas fa-bed"></i> <span>4 Bedrooms</span> </div> <div class="feature"> <i class="fas fa-bath"></i> <span>5 Bathrooms</span> </div> <div class="feature"> <i class="fas fa-ruler-combined"></i> <span>4,100 sq ft</span> </div> <div class="feature"> <i class="fas fa-skiing"></i> <span>Ski Access</span> </div> </div> </div> <button class="details-toggle"> <i class="fas fa-info"></i> </button> </div> </div> <div class="navigation"> <div class="nav-buttons"> <button class="nav-btn prev-btn"> <i class="fas fa-chevron-left"></i> </button> <button class="nav-btn next-btn"> <i class="fas fa-chevron-right"></i> </button> </div> <div class="progress-container"> <div class="progress-bar"> <div class="progress-fill"></div> </div> </div> <div class="slide-indicator"> <span id="currentSlide">1</span> / <span id="totalSlides">4</span> </div> </div> <div class="thumbnails"> <div class="thumbnail active" data-index="0"> <img src="https://images.unsplash.com/photo-1613490493576-7fde63acd811?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Modern Villa"> </div> <div class="thumbnail" data-index="1"> <img src="https://images.unsplash.com/photo-1613977257363-707ba9348227?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Penthouse"> </div> <div class="thumbnail" data-index="2"> <img src="https://images.unsplash.com/photo-1613977257592-4871e5fcd7c4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Lakeside Estate"> </div> <div class="thumbnail" data-index="3"> <img src="https://images.unsplash.com/photo-1616587226154-91eab0a51dc7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80" alt="Mountain Retreat"> </div> </div> </div> </body> </html>
CSS
:root { --primary: #0a2540; --secondary: #ff6b35; --accent: #00b4d8; --light: #f8f9fa; --dark: #1a1a1a; --gray: #8a8d93; --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); --shadow: 0 20px 40px rgba(0, 0, 0, 0.15); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: var(--dark); line-height: 1.6; overflow-x: hidden; min-height: 100vh; } .container { max-width: 1400px; margin: 0 auto; padding: 30px 20px; } /* Header */ .main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; padding: 20px 0; position: relative; } .logo { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--primary); position: relative; display: inline-block; } .logo::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 60%; height: 3px; background: var(--secondary); transform: scaleX(0); transform-origin: left; transition: transform 0.6s ease; } .logo:hover::after { transform: scaleX(1); } .header-tagline { color: var(--gray); font-size: 1.1rem; letter-spacing: 1px; text-transform: uppercase; } /* Main Slider */ .slider-wrapper { position: relative; height: 600px; border-radius: 25px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 40px; perspective: 1000px; } .slider { display: flex; height: 100%; width: 100%; position: relative; } .slide { min-width: 100%; height: 100%; position: absolute; top: 0; left: 0; opacity: 0; transform: translateX(100px) scale(0.95); transition: var(--transition); z-index: 1; } .slide.active { opacity: 1; transform: translateX(0) scale(1); z-index: 2; } .slide.prev { opacity: 0.3; transform: translateX(-100px) scale(0.95); z-index: 1; } .slide-image { width: 100%; height: 100%; object-fit: cover; border-radius: 25px; } /* Slide Content Overlay */ .slide-content { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(10, 37, 64, 0.95) 0%, transparent 100%); color: white; padding: 50px; border-radius: 0 0 25px 25px; transform: translateY(20px); opacity: 0; transition: var(--transition); } .slide.active .slide-content { transform: translateY(0); opacity: 1; transition-delay: 0.3s; } .property-price { font-size: 3.5rem; font-weight: 700; margin-bottom: 15px; color: var(--secondary); font-family: 'Playfair Display', serif; } .property-title { font-size: 2.8rem; font-weight: 600; margin-bottom: 20px; line-height: 1.1; font-family: 'Playfair Display', serif; } .property-location { display: flex; align-items: center; gap: 15px; font-size: 1.2rem; margin-bottom: 25px; opacity: 0.9; } .property-location i { color: var(--secondary); } .property-features { display: flex; gap: 25px; margin-bottom: 30px; } .feature { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.15); padding: 12px 20px; border-radius: 30px; backdrop-filter: blur(10px); transition: var(--transition); } .feature:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-5px); } .feature i { color: var(--secondary); font-size: 1.2rem; } /* Slide Counter */ .slide-counter { position: absolute; top: 30px; right: 30px; background: rgba(0, 0, 0, 0.7); color: white; padding: 12px 25px; border-radius: 30px; font-weight: 600; font-size: 1.1rem; z-index: 3; backdrop-filter: blur(10px); } /* Status Badge */ .status-badge { position: absolute; top: 30px; left: 30px; background: var(--secondary); color: white; padding: 12px 25px; border-radius: 30px; font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; z-index: 3; transform: translateY(-20px); opacity: 0; transition: var(--transition); } .slide.active .status-badge { transform: translateY(0); opacity: 1; transition-delay: 0.2s; } /* Navigation */ .navigation { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; } .nav-buttons { display: flex; gap: 20px; } .nav-btn { width: 70px; height: 70px; border-radius: 50%; background: white; border: none; color: var(--primary); font-size: 1.5rem; cursor: pointer; transition: var(--transition); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .nav-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--primary); transform: scale(0); border-radius: 50%; transition: transform 0.4s ease; } .nav-btn:hover::before { transform: scale(1); } .nav-btn:hover { color: white; } .nav-btn i { position: relative; z-index: 2; } /* Progress Bar */ .progress-container { flex: 1; max-width: 600px; margin: 0 40px; } .progress-bar { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.1); border-radius: 3px; overflow: hidden; position: relative; } .progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 3px; transition: width 0.3s ease; } /* Thumbnails */ .thumbnails { display: flex; justify-content: center; gap: 15px; margin-top: 40px; } .thumbnail { width: 120px; height: 80px; border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; opacity: 0.6; transition: var(--transition); filter: grayscale(30%); } .thumbnail:hover { opacity: 0.8; transform: translateY(-5px); } .thumbnail.active { opacity: 1; filter: grayscale(0); transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); } .thumbnail img { width: 100%; height: 100%; object-fit: cover; } /* Floating Elements */ .floating-tag { position: absolute; top: 100px; right: 50px; background: rgba(255, 107, 53, 0.9); color: white; padding: 15px 30px; border-radius: 30px; font-weight: 600; font-size: 0.9rem; z-index: 3; transform: rotate(5deg); animation: float 6s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: rotate(5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-10px); } } /* Property Details Expand */ .details-toggle { position: absolute; bottom: 30px; right: 30px; background: rgba(255, 255, 255, 0.2); color: white; border: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; z-index: 3; backdrop-filter: blur(10px); transition: var(--transition); } .details-toggle:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(180deg); } /* Responsive Design */ @media (max-width: 1200px) { .slider-wrapper { height: 550px; } .property-price { font-size: 3rem; } .property-title { font-size: 2.4rem; } } @media (max-width: 992px) { .slider-wrapper { height: 500px; } .property-price { font-size: 2.5rem; } .property-title { font-size: 2rem; } .slide-content { padding: 40px; } .property-features { gap: 15px; flex-wrap: wrap; } .feature { padding: 10px 15px; } } @media (max-width: 768px) { .main-header { flex-direction: column; text-align: center; gap: 20px; } .slider-wrapper { height: 450px; } .property-price { font-size: 2.2rem; } .property-title { font-size: 1.8rem; } .slide-content { padding: 30px; } .navigation { flex-direction: column; gap: 25px; } .progress-container { width: 100%; max-width: 100%; margin: 0; } .nav-btn { width: 60px; height: 60px; } .thumbnail { width: 100px; height: 70px; } .floating-tag { top: 80px; right: 30px; padding: 12px 25px; } } @media (max-width: 576px) { .container { padding: 20px 15px; } .slider-wrapper { height: 400px; border-radius: 20px; } .slide-image { border-radius: 20px; } .property-price { font-size: 1.8rem; } .property-title { font-size: 1.5rem; } .slide-content { padding: 25px; } .property-features { gap: 10px; } .feature { padding: 8px 12px; font-size: 0.9rem; } .status-badge, .slide-counter { top: 20px; padding: 10px 20px; font-size: 0.8rem; } .status-badge { left: 20px; } .slide-counter { right: 20px; } .thumbnail { width: 80px; height: 60px; } .floating-tag { top: 60px; right: 20px; padding: 10px 20px; font-size: 0.8rem; } } @media (max-width: 400px) { .slider-wrapper { height: 350px; } .property-price { font-size: 1.6rem; } .property-title { font-size: 1.3rem; } .property-features { flex-direction: column; align-items: flex-start; } .thumbnail { width: 70px; height: 50px; } } /* Animations */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } .animate-in { animation: fadeInUp 0.8s ease forwards; }
JavaScript
document.addEventListener('DOMContentLoaded', function() { // Elements const slides = document.querySelectorAll('.slide'); const thumbnails = document.querySelectorAll('.thumbnail'); const prevBtn = document.querySelector('.prev-btn'); const nextBtn = document.querySelector('.next-btn'); const progressFill = document.querySelector('.progress-fill'); const currentSlideSpan = document.getElementById('currentSlide'); const totalSlidesSpan = document.getElementById('totalSlides'); const slideIndicators = document.querySelector('.slide-indicator'); const detailsButtons = document.querySelectorAll('.details-toggle'); // Variables let currentSlide = 0; const totalSlides = slides.length; let autoSlideInterval; const slideDuration = 7000; // 7 seconds // Initialize totalSlidesSpan.textContent = totalSlides; updateProgress(); // Function to update slide position function updateSlide(index) { // Remove active class from all slides slides.forEach(slide => { slide.classList.remove('active', 'prev'); }); thumbnails.forEach(thumb => thumb.classList.remove('active')); // Calculate previous slide index let prevIndex = index - 1; if (prevIndex < 0) prevIndex = totalSlides - 1; // Add classes slides[index].classList.add('active'); slides[prevIndex].classList.add('prev'); thumbnails[index].classList.add('active'); // Update indicators currentSlide = index; currentSlideSpan.textContent = index + 1; updateProgress(); // Reset auto-slide timer resetAutoSlide(); } // Next slide function function nextSlide() { const nextIndex = (currentSlide + 1) % totalSlides; updateSlide(nextIndex); } // Previous slide function function prevSlide() { const prevIndex = (currentSlide - 1 + totalSlides) % totalSlides; updateSlide(prevIndex); } // Update progress bar function updateProgress() { const progress = ((currentSlide + 1) / totalSlides) * 100; progressFill.style.width = `${progress}%`; } // Auto-slide functionality function startAutoSlide() { autoSlideInterval = setInterval(nextSlide, slideDuration); } function resetAutoSlide() { clearInterval(autoSlideInterval); startAutoSlide(); } // Event Listeners prevBtn.addEventListener('click', prevSlide); nextBtn.addEventListener('click', nextSlide); // Thumbnail click thumbnails.forEach(thumbnail => { thumbnail.addEventListener('click', function() { const index = parseInt(this.getAttribute('data-index')); updateSlide(index); }); }); // Details button detailsButtons.forEach(button => { button.addEventListener('click', function() { const slide = this.closest('.slide'); const propertyTitle = slide.querySelector('.property-title').textContent; const propertyPrice = slide.querySelector('.property-price').textContent; alert(`Property Details:\n\n${propertyTitle}\nPrice: ${propertyPrice}\n\nFor detailed information and viewing schedule, please contact our real estate agent.`); }); }); // Keyboard navigation document.addEventListener('keydown', function(e) { if (e.key === 'ArrowLeft') prevSlide(); if (e.key === 'ArrowRight') nextSlide(); }); // Touch swipe for mobile let touchStartX = 0; let touchEndX = 0; const sliderWrapper = document.querySelector('.slider-wrapper'); sliderWrapper.addEventListener('touchstart', function(e) { touchStartX = e.changedTouches[0].screenX; }); sliderWrapper.addEventListener('touchend', function(e) { touchEndX = e.changedTouches[0].screenX; handleSwipe(); }); function handleSwipe() { const swipeThreshold = 50; if (touchStartX - touchEndX > swipeThreshold) { // Swipe left - next slide nextSlide(); } if (touchEndX - touchStartX > swipeThreshold) { // Swipe right - previous slide prevSlide(); } } // Hover pause on slider sliderWrapper.addEventListener('mouseenter', function() { clearInterval(autoSlideInterval); }); sliderWrapper.addEventListener('mouseleave', function() { startAutoSlide(); }); // Initialize auto-slide startAutoSlide(); // Add animation to elements on load setTimeout(() => { document.querySelectorAll('.animate-in').forEach(el => { el.style.animation = 'none'; setTimeout(() => { el.style.animation = ''; }, 10); }); }, 100); });
Output Preview
Desktop
Mobile
Fullscreen