组件 图表 图表组件

图表组件

一个为电子商务网页应用设计的复杂图表组件,采用暗模式和灰度配色方案。该组件包括多个交互元素,如图表、数据点、工具提示和按钮,并使用Tailwind CSS实现响应式设计。

预览

HTML 代码

<div class="bg-gray-900 text-gray-100 p-6 rounded-lg shadow-lg">
    <h2 class="text-2xl font-bold mb-4">Sales Chart</h2>
    <div class="flex items-center justify-between mb-4">
        <span class="text-lg">Last 30 Days</span>
        <button class="bg-gray-700 hover:bg-gray-600 text-gray-100 py-1 px-3 rounded">Weekly</button>
        <button class="bg-gray-700 hover:bg-gray-600 text-gray-100 py-1 px-3 rounded">Monthly</button>
        <button class="bg-gray-700 hover:bg-gray-600 text-gray-100 py-1 px-3 rounded">Yearly</button>
    </div>
    <div class="relative">
        <img src="https://picsum.photos/600/300" alt="Sales Chart" class="w-full rounded-lg">
        <div class="absolute top-0 left-0 w-full h-full flex items-center justify-center bg-gray-800 bg-opacity-50 rounded-lg">
            <span class="text-xl font-semibold">$23,000</span>
            <span class="text-sm">Total Sales</span>
        </div>
    </div>
    <div class="mt-4">
        <div class="flex justify-around text-sm text-gray-400">
            <div class="text-center">
                <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full mb-2">
                <span>User 1</span>
            </div>
            <div class="text-center">
                <img src="https://randomuser.me/api/portraits/women/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full mb-2">
                <span>User 2</span>
            </div>
            <div class="text-center">
                <img src="https://randomuser.me/api/portraits/men/2.jpg" alt="User Avatar" class="w-10 h-10 rounded-full mb-2">
                <span>User 3</span>
            </div>
        </div>
    </div>
</div>

相关组件

玻璃化销售图表

一个简单的响应式图表组件,采用玻璃质感风格,色彩鲜艳,支持深色模式,适合电子商务仪表盘。

打开

生动玻璃态图表

一个简单的玻璃态图表组件,色彩鲜艳,适合博客和内容网站。该组件是响应式的,使用Tailwind CSS支持暗黑主题。

打开

图表组件

一个响应式图表组件,采用拟物化风格设计,具有灰度配色方案和深色模式支持,非常适合电子商务应用程序。

打开