Media Embed Component
A responsive media embed component styled with a retro/vintage aesthetic, supporting dark theme and featuring placeholder images and avatars.
HTML Code
<div class="max-w-lg mx-auto bg-white rounded-lg shadow-lg overflow-hidden dark:bg-gray-800">
<div class="relative">
<img class="w-full h-48 object-cover" src="https://picsum.photos/600/400?random=1" alt="Retro Media">
<div class="absolute top-0 left-0 right-0 bg-black bg-opacity-50 p-4">
<h2 class="text-white text-xl font-bold">Retro Media Title</h2>
<p class="text-gray-300">This is a description of the retro media.</p>
</div>
</div>
<div class="p-4">
<h3 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Posted by</h3>
<div class="flex items-center mt-2">
<img class="w-10 h-10 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Avatar">
<div class="ml-3">
<p class="text-gray-800 dark:text-gray-200 font-semibold">John Doe</p>
<p class="text-gray-500 dark:text-gray-400 text-sm">5 minutes ago</p>
</div>
</div>
</div>
<style>
@media (prefers-color-scheme: dark) {
.bg-white {background-color: #1a202c;}
.text-gray-800 {color: #e2e8f0;}
.text-gray-300 {color: #edf2f7;}
}
.bg-black { background-color: rgba(0, 0, 0, 0.8); }
.rounded-lg { border-radius: 0.5rem; }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.2); }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }
@media (max-width: 640px) {
.h-48 { height: 12rem; }
}
</style>
</div>
Related Components
Retro Media Embed Component
A responsive Media Embed Component with a "Retro/Vintage" design, inspired by 80s/90s aesthetics like old CRT monitors and VCR players. It uses a complementary color scheme of Teal and Orange on a Slate gray base, suitable for "Business/Corporate" websites. The component features moderate complexity with hover effects on the play button and media thumbnail, a faux REC light animation, and decorative non-functional control elements. It includes dark theme support using Tailwind's `dark:` prefix. The media area is designed for a 16:9 aspect ratio (requires Tailwind aspect-ratio plugin or a CSS fallback like padding-bottom trick). Placeholder image from picsum.photos is used.
Media Embed Component
Media Embed Component with Microinteractions, responsive effects, and dark theme support. No Javascript needed.
Media Embed Component
A complex, responsive media embed component for blog/content consumption, featuring organic/nature-inspired design, jewel tones, and dark mode support. Includes a video player, article content, and related media.