Component

File Card

File browser card with file type icon, metadata, sharing info, and action buttons on hover.

  • Component
  • Tailwind
  • HTML
  • MIT

What it does

Capabilities

  • File type icon
  • File metadata
  • Sharing info
  • Avatar group
  • Hover actions

Preview

Live component

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/components/cards/file-card/
fluid · no fixed width 100%
No dependencies Production-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Components/Cards/file-card
registry path: Tailwind/Components/Cards/file-card

Source

Implementation

code.html
<div class="group bg-white rounded-xl border border-gray-100 shadow-sm hover:shadow-md hover:border-gray-200 transition-all p-4">
  <div class="flex items-center gap-4">
    <div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
      <svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
      </svg>
    </div>
    
    <div class="flex-1 min-w-0">
      <h4 class="font-medium text-gray-900 truncate group-hover:text-blue-600 transition-colors">Q4_Financial_Report.pdf</h4>
      <div class="flex items-center gap-3 text-xs text-gray-500 mt-0.5">
        <span>PDF</span>
        <span>•</span>
        <span>2.4 MB</span>
        <span>•</span>
        <span>Modified 2 days ago</span>
      </div>
    </div>
    
    <div class="flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity">
      <button class="p-2 hover:bg-gray-100 rounded-lg text-gray-400 hover:text-gray-600 transition-colors">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
        </svg>
      </button>
      <button class="p-2 hover:bg-gray-100 rounded-lg text-gray-400 hover:text-gray-600 transition-colors">
        <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"/>
        </svg>
      </button>
    </div>
  </div>
  
  <div class="mt-3 pt-3 border-t border-gray-50 flex items-center gap-4">
    <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=64&h=64&fit=crop&crop=faces" alt="Shared by" class="w-6 h-6 rounded-full object-cover">
    <span class="text-xs text-gray-500">Shared by Sarah Mitchell</span>
    <div class="flex-1"></div>
    <div class="flex -space-x-2">
      <img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=64&h=64&fit=crop&crop=faces" class="w-6 h-6 rounded-full border-2 border-white" alt="">
      <img src="https://images.unsplash.com/photo-1517841905240-472988babdf9?w=64&h=64&fit=crop&crop=faces" class="w-6 h-6 rounded-full border-2 border-white" alt="">
      <div class="w-6 h-6 rounded-full border-2 border-white bg-gray-100 flex items-center justify-center text-xs font-medium text-gray-600">+3</div>
    </div>
  </div>
</div>
44 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this component straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://components/cards/file-card
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/components/cards/file-card/

Install: npx devsnips add
Tailwind/Components/Cards/file-card

This is the File Card — File browser card with file type icon, metadata, sharing info, and action buttons on hover.

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://components/cards/file-card