Vector Motion
Medical

Social Work Card - Social Services

Monitor social work services and patient support. Track care coordination and social determinants.

Social Work Card

The Social Work Card Track social work consultations and patient support services.

Preview

Installation

ash npx shadcn@latest add https://vectormotion.vercel.app/registry/social-work-card.json

Social Work Card
'use client'import React from 'react';import { Users, FileText, ArrowRight } 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 SocialWorkCardProps {   className?: string;   title?: string;   subtitle?: string;   activeCases?: number;   newCases?: number;   pendingPlacement?: number;   dueAssessments?: number;}const DEFAULT_TITLE = "Social Work";const DEFAULT_SUBTITLE = "Case Management";const DEFAULT_ACTIVE_CASES = 18;const DEFAULT_NEW_CASES = 5;const DEFAULT_PENDING_PLACEMENT = 3;const DEFAULT_DUE_ASSESSMENTS = 2;export const SocialWorkCard: React.FC<SocialWorkCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   activeCases = DEFAULT_ACTIVE_CASES,   newCases = DEFAULT_NEW_CASES,   pendingPlacement = DEFAULT_PENDING_PLACEMENT,   dueAssessments = DEFAULT_DUE_ASSESSMENTS,}) => {   const isInteractive = true;   const index = 34;   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-cyan-300 dark:hover:border-cyan-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-cyan-500"></span>                     </span>                     <p className="text-sm text-muted-foreground font-medium">                        {subtitle}                     </p>                  </div>               </div>               <div className="rounded-xl bg-cyan-50 dark:bg-cyan-900/20 p-2.5 text-cyan-600 dark:text-cyan-400 flex items-center justify-center ring-1 ring-cyan-100 dark:ring-cyan-800">                  <Users className="h-5 w-5" />               </div>            </div>            <div className="flex-1 space-y-3">               <div className="flex items-end justify-between">                  <div className="flex flex-col">                     <span className="text-3xl font-bold text-foreground">{activeCases}</span>                     <span className="text-xs text-muted-foreground">Active Cases</span>                  </div>                  <span className="flex items-center gap-1 text-[10px] text-cyan-600 font-bold bg-cyan-50 dark:bg-cyan-900/20 px-2 py-1 rounded-full uppercase tracking-wider">                     {newCases} New <ArrowRight className="h-3 w-3" />                  </span>               </div>               <div className="space-y-2 pt-1">                  <div className="flex justify-between items-center bg-muted p-2 rounded-lg border border-border">                     <div className="flex items-center gap-2">                        <FileText className="h-3.5 w-3.5 text-muted-foreground" />                        <span className="text-xs font-semibold text-zinc-600 dark:text-zinc-300">Placement</span>                     </div>                     <span className="text-xs font-bold text-foreground">{pendingPlacement} Pending</span>                  </div>                  <div className="flex justify-between items-center bg-muted p-2 rounded-lg border border-border">                     <div className="flex items-center gap-2">                        <FileText className="h-3.5 w-3.5 text-muted-foreground" />                        <span className="text-xs font-semibold text-zinc-600 dark:text-zinc-300">Initial Assess</span>                     </div>                     <span className="text-xs font-bold text-foreground">{dueAssessments} Due</span>                  </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