组件 容器 容器组件

容器组件

一个用于仪表板的极简容器组件,使用具有深色模式支持的 Tailwind CSS。

预览

HTML 代码

<div class="bg-gray-100 dark:bg-gray-800 p-6 rounded-lg shadow-md">
    <h2 class="text-xl font-semibold text-gray-800 dark:text-white mb-4">Dashboard</h2>
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
        <div class="bg-white dark:bg-gray-700 p-4 rounded-lg shadow">
            <h3 class="text-lg font-medium text-gray-800 dark:text-white mb-2">Data Card 1</h3>
            <img src="https://picsum.photos/200/100" alt="Data visualization image" class="w-full h-auto rounded-lg mb-2">
            <p class="text-gray-600 dark:text-gray-300">Some description of the data card.</p>
        </div>
        <div class="bg-white dark:bg-gray-700 p-4 rounded-lg shadow">
            <h3 class="text-lg font-medium text-gray-800 dark:text-white mb-2">Data Card 2</h3>
            <img src="https://picsum.photos/200/100" alt="Data visualization image" class="w-full h-auto rounded-lg mb-2">
            <p class="text-gray-600 dark:text-gray-300">Some description of the data card.</p>
        </div>
        <div class="bg-white dark:bg-gray-700 p-4 rounded-lg shadow">
            <h3 class="text-lg font-medium text-gray-800 dark:text-white mb-2">Data Card 3</h3>
            <img src="https://picsum.photos/200/100" alt="Data visualization image" class="w-full h-auto rounded-lg mb-2">
            <p class="text-gray-600 dark:text-gray-300">Some description of the data card.</p>
        </div>
    </div>
    <div class="mt-6 flex items-center justify-between">
        <div class="flex items-center">
            <img src="https://randomuser.me/api/portraits/thumb/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full mr-2">
            <span class="text-gray-800 dark:text-white font-medium">User Name</span>
        </div>
        <button class="bg-gray-800 dark:bg-gray-200 text-white dark:text-gray-800 font-semibold py-2 px-4 rounded hover:bg-gray-700 dark:hover:bg-gray-300">Action</button>
    </div>
</div>

相关组件

粗犷主义容器组件

一个简单但大胆的容器组件,采用粗犷主义风格和鲜艳色彩方案,适合商业或企业网站,支持使用 Tailwind CSS 的黑暗模式。

打开

材料设计容器

一个使用Tailwind CSS的材料设计风格容器组件,具有响应式设计和暗主题支持。

打开

容器组件

用于电子商务的响应式 Material Design 容器,具有柔和的色彩、深色模式支持和使用 Tailwind CSS 的复杂交互式元素。

打开