组件 文件查看器 File Viewer 组件

File Viewer 组件

一个响应式文件查看器组件,专为深色模式下的电子商务网站设计,采用单色配色方案。它包括文件上传和预览等交互式功能。

预览

HTML 代码

<div class="bg-gray-800 text-gray-200 p-6 rounded-lg shadow-lg max-w-lg mx-auto">
    <h2 class="text-2xl font-semibold mb-4">File Viewer</h2>
    <div class="mb-4">
        <label class="block mb-2">Upload File:</label>
        <input type="file" class="bg-gray-900 text-gray-200 p-2 border border-gray-600 rounded w-full" />
    </div>
    <div class="mt-4">
        <h3 class="text-xl mb-2">File Preview:</h3>
        <div class="bg-gray-700 p-4 rounded">
            <img src="https://picsum.photos/300/200" alt="Preview" class="w-full rounded" />
        </div>
        <div class="flex items-center mt-2">
            <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full mr-2" />
            <div>
                <span class="font-bold">Uploaded by:</span> John Doe
            </div>
        </div>
    </div>
    <div class="mt-4">
        <button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded">
            Confirm Upload
        </button>
    </div>
</div>

相关组件

文件查看器组件

支持深色模式的响应式文件查看器组件

打开

拟物化文件查看器组件

用于社交媒体的 Neumorphism 风格的 File Viewer 组件,具有互补的配色方案和适度的复杂度。它是响应式的,并支持使用 Tailwind CSS 的深色主题。

打开

File Viewer 组件

具有深色模式的响应式文件查看器组件

打开