Medical
Chronic Care Card - Patient Management
Track chronic disease patient management and care plans. Monitor patient compliance and chronic condition outcomes.
Chronic Care Card
The Chronic Care Card Monitor chronic care management program metrics and patient outcomes.
Preview
Installation
ash npx shadcn@latest add https://vectormotion.vercel.app/registry/chronic-care-card.json
Chronic Care Card
'use client'import React from 'react';import { HeartPulse, Activity } 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 CareItem { label: string; count: number; status: string;}interface ChronicCareCardProps { className?: string; title?: string; subtitle?: string; items?: CareItem[];}const DEFAULT_ITEMS: CareItem[] = [ { label: "Diabetes", count: 45, status: "Active" }, { label: "CHF", count: 32, status: "Active" },];const DEFAULT_TITLE = "Chronic Care";const DEFAULT_SUBTITLE = "Active Management";export const ChronicCareCard: React.FC<ChronicCareCardProps> = ({ className = "", title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, items = DEFAULT_ITEMS,}) => { const isInteractive = true; const index = 29; 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-red-300 dark:hover:border-red-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-red-400"></span> </span> <p className="text-sm text-muted-foreground font-medium"> {subtitle} </p> </div> </div> <div className="rounded-xl bg-red-50 dark:bg-red-900/20 p-2.5 text-red-500 dark:text-red-400 flex items-center justify-center ring-1 ring-red-100 dark:ring-red-800"> <HeartPulse className="h-5 w-5" /> </div> </div> <div className="flex-1 space-y-3"> {items.map((item, index) => ( <div key={index} className="flex items-center justify-between p-3 rounded-xl bg-muted border border-border"> <div className="flex items-center gap-3"> <div className="bg-white dark:bg-zinc-700 rounded-full h-8 w-8 flex items-center justify-center shadow-sm text-xs font-bold"> {item.count} </div> <span className="text-sm font-semibold text-foreground">{item.label}</span> </div> <span className="text-[10px] text-muted-foreground bg-zinc-100 dark:bg-zinc-700/50 px-1.5 py-0.5 rounded">{item.status}</span> </div> ))} </div> </div> </motion.div> );};Usage
This component is a demo card displaying medical metrics with animated visualizations and dark mode support.
Prop
Type