组件 资本 黑暗模式模态组件

黑暗模式模态组件

一个简单且响应式的暗黑模式模态组件,设计用于阅读和内容消费。它具有互补色彩方案和极简布局,适合博客或内容驱动的网站。

预览

HTML 代码

<div class="fixed inset-0 z-50 flex items-center justify-center bg-gray-800 bg-opacity-75 dark:bg-gray-900" role="dialog" aria-modal="true">
    <div class="bg-gray-900 rounded-lg shadow-lg max-w-sm w-full p-6">
        <button class="absolute top-3 right-3 text-gray-500 hover:text-gray-300 dark:text-gray-400 dark:hover:text-gray-200" aria-label="Close">&times;</button>
        <h2 class="text-xl text-white font-semibold mb-4">Blog Post Title</h2>
        <img class="w-full h-32 object-cover rounded-lg mb-4" src="https://picsum.photos/400/200" alt="Random Image">
        <p class="text-gray-300 dark:text-gray-200 mb-4">This is a simple modal component designed for displaying content in dark mode. It is responsive and features a clean layout that aids in reading.</p>
        <div class="flex items-center">
            <img class="w-10 h-10 rounded-full mr-3" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar">
            <div>
                <p class="text-sm text-gray-400 dark:text-gray-300">Posted by John Doe</p>
                <p class="text-xs text-gray-500 dark:text-gray-400">3 minutes ago</p>
            </div>
        </div>
    </div>
</div>

相关组件

模态组件

一个响应式模态组件,采用微交互和三元配色方案设计,适用于社交媒体界面。具有用户交互时的动画效果,并使用Tailwind CSS提供暗主题支持。

打开

拟物化自然风格模态组件

一个复杂的响应式模态组件,采用拟物化设计,地球色调配色方案,并支持黑暗主题,适合用作作品集。具有多个互动元素,无需JavaScript。

打开

复古博客模态

一个复古风格的模态组件,适用于博客内容,特色是互补的配色方案,适度复杂的互动元素,响应式设计,并支持深色模式。未使用JavaScript,仅依赖HTML和Tailwind CSS类。图片来源于picsum.photos,头像来源于randomuser.me。

打开