Medical

Organ Transplant Card - Transplant Services

Track organ transplant wait lists and matching processes. Monitor transplant procedures and graft outcomes.

Organ Transplant Card

The Organ Transplant Card Monitor organ transplant waitlist and procedure status.

Preview

Installation

ash npx shadcn@latest add https://www.vectormotion.dev/registry/organ-transplant-card.json

Organ Transplant Card
'use client'import React from 'react';import { Gift, HeartHandshake, Box } 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 OrganTransplantCardProps {   className?: string;   title?: string;   subtitle?: string;   activeOffers?: number;   kidneyWaitlistCount?: number;   liverWaitlistCount?: number;   kidneyProgress?: number;   liverProgress?: number;}const DEFAULT_TITLE = "Transplant";const DEFAULT_SUBTITLE = "Waitlist & Match";const DEFAULT_ACTIVE_OFFERS = 2;const DEFAULT_KIDNEY_WAITLIST_COUNT = 85;const DEFAULT_LIVER_WAITLIST_COUNT = 32;const DEFAULT_KIDNEY_PROGRESS = 65;const DEFAULT_LIVER_PROGRESS = 30;export const OrganTransplantCard: React.FC<OrganTransplantCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   activeOffers = DEFAULT_ACTIVE_OFFERS,   kidneyWaitlistCount = DEFAULT_KIDNEY_WAITLIST_COUNT,   liverWaitlistCount = DEFAULT_LIVER_WAITLIST_COUNT,   kidneyProgress = DEFAULT_KIDNEY_PROGRESS,   liverProgress = DEFAULT_LIVER_PROGRESS,}) => {   const isInteractive = true;   const index = 48;   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-primary/50 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-emerald-500"></span>                     </span>                     <p className="text-sm text-muted-foreground font-medium">                        {subtitle}                     </p>                  </div>               </div>               <div className="rounded-xl bg-emerald-500/10 p-2.5 text-emerald-500 flex items-center justify-center ring-1 ring-emerald-100 dark:ring-emerald-800">                  <Gift className="h-5 w-5" />               </div>            </div>            <div className="flex-1 space-y-4">               <div className="flex items-center justify-between p-3 bg-emerald-50 dark:bg-emerald-900/10 rounded-xl border border-emerald-100 dark:border-emerald-900/30">                  <div className="flex items-center gap-2">                     <Box className="h-4 w-4 text-emerald-500" />                     <span className="text-sm font-bold text-zinc-800 dark:text-zinc-200">Active Offers</span>                  </div>                  <span className="text-lg font-black text-emerald-500">{activeOffers}</span>               </div>               <div className="space-y-3">                  <div>                     <div className="flex justify-between text-xs mb-1.5">                        <span className="font-medium text-zinc-600 dark:text-muted-foreground">Kidney Waitlist</span>                        <span className="font-bold text-foreground">{kidneyWaitlistCount}</span>                     </div>                     <div className="w-full bg-zinc-100 dark:bg-zinc-800 h-1.5 rounded-full overflow-hidden">                        <motion.div initial={{ width: 0 }} animate={{ width: `${kidneyProgress}%` }} className="bg-emerald-500 h-full rounded-full" />                     </div>                  </div>                  <div>                     <div className="flex justify-between text-xs mb-1.5">                        <span className="font-medium text-zinc-600 dark:text-muted-foreground">Liver Waitlist</span>                        <span className="font-bold text-foreground">{liverWaitlistCount}</span>                     </div>                     <div className="w-full bg-zinc-100 dark:bg-zinc-800 h-1.5 rounded-full overflow-hidden">                        <motion.div initial={{ width: 0 }} animate={{ width: `${liverProgress}%` }} transition={{ delay: 0.1 }} className="bg-emerald-400 h-full rounded-full" />                     </div>                  </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