Komponenten Bild-Lightbox Bild-Lightbox-Komponente

Bild-Lightbox-Komponente

Eine responsive Bild-Lightbox-Komponente mit einem Retro-/Vintage-Theme unter Verwendung von Tailwind CSS, die den Dunkelmodus unterstützt und Platzhalterbilder enthält.

Vorschau

HTML-Code

<div class="relative bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md mx-auto mt-10">
    <img id="lightbox-trigger" src="https://picsum.photos/600/400?random=1" class="w-full h-48 object-cover rounded-t-lg" alt="Vintage Image">
    <div class="p-4">
        <h2 class="text-lg font-bold text-gray-800 dark:text-gray-200">Vintage Aesthetic</h2>
        <p class="text-gray-600 dark:text-gray-400">A nostalgic look into the past with a touch of modern design.</p>
    </div>
    <div class="flex justify-center pb-4">
        <button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">View More Images</button>
    </div>
    <div id="lightbox" class="hidden fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50">
        <span class="absolute top-4 right-4 text-white cursor-pointer" onclick="document.getElementById('lightbox').classList.add('hidden')">&times;</span>
        <img src="https://picsum.photos/1200/800?random=1" class="max-w-full max-h-full rounded shadow-lg" alt="Lightbox Image">
    </div>
</div>

<style>
    /* Dark mode styling */
    @media (prefers-color-scheme: dark) {
        .bg-white {
            background-color: #1f2937;
        }
        .text-gray-800 {
            color: #e5e7eb;
        }
        .text-gray-600 {
            color: #d1d5db;
        }
    }
</style>

Verwandte Komponenten

Bild-Lightbox-Komponente

Eine Retro-/Vintage-Bild-Lightbox-Komponente mit lebendigen Farben, responsivem Design und Unterstützung für dunkle Themen, die für Portfolios geeignet ist.

Offen

Bild-Lightbox-Komponente

Eine responsive Bild-Lightbox-Komponente, die für Dashboards entwickelt wurde und einen 3D-Stil und ein monochromatisches Farbschema aufweist. Es enthält Hover-Effekte und modale Funktionen mit Tailwind CSS für die Unterstützung des Dunkelmodus.

Offen

Bild-Lightbox-Komponente

Eine responsive Bild-Lightbox-Komponente, die für den E-Commerce mit einem minimalistischen Flat-Design-Stil entwickelt wurde und helle und dunkle Themen mit Tailwind CSS unterstützt.

Offen