VectorMotion
Medical

Palliative Care Card - End-of-Life Care

Monitor palliative care programs and patient comfort. Track end-of-life care quality and patient/family satisfaction.

Palliative Care Card

The Palliative Care Card Monitor palliative care patient status and comfort measures.

Preview

Installation

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

Palliative Care Card
'use client'import React from 'react';import { Sunset, HeartHandshake, UserPlus } 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 PalliativeCareCardProps {   className?: string;   title?: string;   subtitle?: string;   activePatients?: number;   newPatients?: number;   avgLengthOfStay?: string;}const DEFAULT_TITLE = "Palliative";const DEFAULT_SUBTITLE = "Supportive Care";const DEFAULT_ACTIVE_PATIENTS = 12;const DEFAULT_NEW_PATIENTS = 4;const DEFAULT_AVG_LENGTH_OF_STAY = "14 days";export const PalliativeCareCard: React.FC<PalliativeCareCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   activePatients = DEFAULT_ACTIVE_PATIENTS,   newPatients = DEFAULT_NEW_PATIENTS,   avgLengthOfStay = DEFAULT_AVG_LENGTH_OF_STAY,}) => {   const isInteractive = true;   const index = 35;   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-indigo-300 dark:hover:border-indigo-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-indigo-400"></span>                     </span>                     <p className="text-sm text-muted-foreground font-medium">                        {subtitle}                     </p>                  </div>               </div>               <div className="rounded-xl bg-indigo-50 dark:bg-indigo-900/20 p-2.5 text-indigo-500 dark:text-indigo-400 flex items-center justify-center ring-1 ring-indigo-100 dark:ring-indigo-800">                  <Sunset className="h-5 w-5" />               </div>            </div>            <div className="flex-1 grid grid-cols-2 gap-3">               <div className="flex flex-col justify-between p-3 rounded-xl bg-muted border border-border">                  <div className="flex items-center gap-1.5 mb-2">                     <HeartHandshake className="h-4 w-4 text-indigo-500" />                     <span className="text-xs font-bold text-muted-foreground uppercase">Active</span>                  </div>                  <span className="text-2xl font-bold text-foreground">{activePatients}</span>               </div>               <div className="flex flex-col justify-between p-3 rounded-xl bg-indigo-50 dark:bg-indigo-900/10 border border-indigo-100 dark:border-indigo-900/30">                  <div className="flex items-center gap-1.5 mb-2">                     <UserPlus className="h-4 w-4 text-indigo-500" />                     <span className="text-xs font-bold text-indigo-600 dark:text-indigo-400 uppercase">New</span>                  </div>                  <span className="text-2xl font-bold text-foreground">{newPatients}</span>               </div>            </div>            <div className="mt-3 text-xs text-center text-muted-foreground font-medium">               Average Length of Stay: <span className="text-foreground font-bold">{avgLengthOfStay}</span>            </div>         </div>      </motion.div>   );};

Usage

This component is a demo card displaying medical metrics with animated visualizations and dark mode support.

Prop

Type

On this page

Free block

Need this in production?

Unlock install commands, source access, commercial use, and AI prompts for all VectorMotion blocks.