Medical
Supply Chain Card - Medical Supplies
Monitor medical supply chain and inventory. Track supply availability and procurement efficiency.
Supply Chain Card
The Supply Chain Card Track medical supply inventory levels and ordering status.
Preview
Installation
ash npx shadcn@latest add https://vectormotion.vercel.app/registry/supply-chain-card.json
Supply Chain Card
'use client'import React from 'react';import { Box, PackageCheck, AlertTriangle, Truck } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs));}interface SupplyItem { name: string; level: number; status: 'ok' | 'warning'; [key: string]: any;}interface SupplyChainCardProps { className?: string; title?: string; subtitle?: string; items?: SupplyItem[]; deliveryName?: string; deliveryEta?: string;}const DEFAULT_ITEMS: SupplyItem[] = [ { name: "PPE Kits", level: 85, status: "ok" }, { name: "IV Fluids", level: 42, status: "warning" }, { name: "Surgical Packs", level: 92, status: "ok" },];const DEFAULT_TITLE = "Supply";const DEFAULT_SUBTITLE = "Inventory Levels";const DEFAULT_DELIVERY_NAME = "IV Fluids";const DEFAULT_DELIVERY_ETA = "2h";export const SupplyChainCard: React.FC<SupplyChainCardProps> = ({ className = "", title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, items = DEFAULT_ITEMS, deliveryName = DEFAULT_DELIVERY_NAME, deliveryEta = DEFAULT_DELIVERY_ETA,}) => { const isInteractive = true; const index = 39; return ( <motion.div layoutId={isInteractive ? `card-${index}-${title}` : undefined} transition={{ duration: 0.4, ease: "easeOut" }} className={cn( "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all flex flex-col h-full", isInteractive ? "hover:border-amber-300 dark:hover:border-amber-700 hover:shadow-md" : "", className )} > <div className="p-5 flex flex-col h-full relative z-10"> <div className="mb-4 flex items-start justify-between"> <div> <h3 className="font-bold text-lg text-foreground"> {title} </h3> <div className="flex items-center gap-1.5 mt-1"> <span className="relative flex h-2 w-2"> <span className="relative inline-flex rounded-full h-2 w-2 bg-amber-500"></span> </span> <p className="text-sm text-muted-foreground font-medium"> {subtitle} </p> </div> </div> <div className="rounded-xl bg-amber-500/10 p-2.5 text-amber-500 flex items-center justify-center ring-1 ring-amber-100 dark:ring-amber-800"> <Box className="h-5 w-5" /> </div> </div> <div className="flex-1 space-y-4"> {items.map((item, i) => ( <div key={i} className="space-y-1.5"> <div className="flex justify-between items-center text-xs"> <span className="font-medium text-foreground">{item.name}</span> <span className={cn( "font-bold", item.status === 'ok' ? "text-foreground" : "text-amber-500" )}> {item.level}% </span> </div> <div className="h-2 w-full bg-zinc-100 dark:bg-zinc-800 rounded-full overflow-hidden"> <motion.div initial={{ width: 0 }} animate={{ width: `${item.level}%` }} transition={{ delay: i * 0.1, duration: 0.5 }} className={cn( "h-full rounded-full", item.status === 'ok' ? "bg-zinc-800 dark:bg-zinc-200" : "bg-amber-500" )} /> </div> </div> ))} <div className="flex items-center gap-3 p-2 bg-muted rounded-lg border border-border"> <div className="h-8 w-8 rounded bg-card text-card-foreground flex items-center justify-center text-blue-500 shadow-sm border border-border"> <Truck className="h-4 w-4" /> </div> <div> <p className="text-xs font-bold text-foreground">Delivery Inbound</p> <p className="text-[10px] text-muted-foreground">{deliveryName} • ETA {deliveryEta}</p> </div> </div> </div> </div> </motion.div> );};Usage
This component is a demo card displaying medical metrics with animated visualizations and dark mode support.
Prop
Type