Medical
Sepsis Protocol Card - Critical Care
Monitor sepsis protocol adherence and patient outcomes. Track sepsis identification and treatment times.
Sepsis Protocol Card
The Sepsis Protocol Card Monitor sepsis screening compliance and protocol adherence.
Preview
Installation
ash npx shadcn@latest add https://vectormotion.vercel.app/registry/sepsis-protocol-card.json
Sepsis Protocol Card
'use client'import React from 'react';import { Flame, CheckCircle, AlertOctagon } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";import { RadialBarChart, RadialBar, ResponsiveContainer, PolarAngleAxis } from 'recharts';function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs));}interface SepsisData { name: string; value: number; fill: string; [key: string]: any;}interface SepsisProtocolCardProps { className?: string; title?: string; subtitle?: string; compliancePercentage?: number; complianceLabel?: string; bundleName?: string; data?: SepsisData[];}const DEFAULT_DATA: SepsisData[] = [ { name: 'Bundle', value: 100, fill: '#f97316' }];const DEFAULT_TITLE = "Sepsis";const DEFAULT_SUBTITLE = "Bundle Compliance";const DEFAULT_COMPLIANCE_PERCENTAGE = 100;const DEFAULT_COMPLIANCE_LABEL = "Compliance";const DEFAULT_BUNDLE_NAME = "3-Hour Bundle";export const SepsisProtocolCard: React.FC<SepsisProtocolCardProps> = ({ className = "", title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, compliancePercentage = DEFAULT_COMPLIANCE_PERCENTAGE, complianceLabel = DEFAULT_COMPLIANCE_LABEL, bundleName = DEFAULT_BUNDLE_NAME, data = DEFAULT_DATA,}) => { const isInteractive = true; const index = 28; 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-orange-300 dark:hover:border-orange-700 hover:shadow-md" : "", className )} > <div className="p-5 flex flex-col h-full relative z-10"> <div className="mb-2 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-orange-500"></span> </span> <p className="text-sm text-muted-foreground font-medium"> {subtitle} </p> </div> </div> <div className="rounded-xl bg-orange-500/10 p-2.5 text-orange-500 flex items-center justify-center ring-1 ring-orange-100 dark:ring-orange-800"> <Flame className="h-5 w-5" /> </div> </div> <div className="flex-1 flex flex-col items-center justify-center"> <div className="relative h-32 w-32"> <ResponsiveContainer width="100%" height="100%"> <RadialBarChart innerRadius="80%" outerRadius="100%" barSize={10} data={data} startAngle={90} endAngle={-270} > <PolarAngleAxis type="number" domain={[0, 100]} angleAxisId={0} tick={false} /> <RadialBar background dataKey="value" cornerRadius={10} /> </RadialBarChart> </ResponsiveContainer> <div className="absolute inset-0 flex flex-col items-center justify-center"> <span className="text-3xl font-bold text-foreground">{compliancePercentage}%</span> <span className="text-[10px] uppercase font-bold text-muted-foreground">{complianceLabel}</span> </div> </div> <div className="mt-4 w-full"> <div className="flex items-center justify-between p-2 rounded-lg bg-emerald-50 dark:bg-emerald-900/10 border border-emerald-100 dark:border-emerald-900/30"> <span className="text-xs font-semibold text-emerald-700 dark:text-emerald-400">{bundleName}</span> <CheckCircle className="h-4 w-4 text-emerald-500" /> </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