Vector Motion
Medical

Provider Productivity Card - Physician Performance

Monitor healthcare provider productivity and patient load. Track provider efficiency and utilization metrics.

Provider Productivity Card

The Provider Productivity Card Track healthcare provider productivity metrics and patient volumes.

Preview

Installation

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

Provider Productivity Card
'use client'import React from 'react';import { TrendingUp, Award, Target } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";import { BarChart, Bar, XAxis, Tooltip, ResponsiveContainer } from 'recharts';function cn(...inputs: ClassValue[]) {   return twMerge(clsx(inputs));}interface ProductivityData {   name: string;   rvu: number;   [key: string]: any;}interface ProviderProductivityCardProps {   className?: string;   title?: string;   subtitle?: string;   totalRvu?: number;   targetPercentage?: string;   data?: ProductivityData[];}const DEFAULT_DATA: ProductivityData[] = [   { name: 'Dr. A', rvu: 450 },   { name: 'Dr. B', rvu: 380 },   { name: 'Dr. C', rvu: 520 },   { name: 'Dr. D', rvu: 410 },];const DEFAULT_TITLE = "Productivity";const DEFAULT_SUBTITLE = "wRVU Targets";const DEFAULT_TOTAL_RVU = 1760;const DEFAULT_TARGET_PERCENTAGE = "103%";export const ProviderProductivityCard: React.FC<ProviderProductivityCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   totalRvu = DEFAULT_TOTAL_RVU,   targetPercentage = DEFAULT_TARGET_PERCENTAGE,   data = DEFAULT_DATA,}) => {   const isInteractive = true;   const index = 42;   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-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-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">                  <TrendingUp className="h-5 w-5" />               </div>            </div>            <div className="flex-1 flex flex-col">               <div className="flex items-center justify-between mb-2">                  <div className="flex items-baseline gap-1">                     <span className="text-3xl font-bold text-foreground">{totalRvu.toLocaleString()}</span>                     <span className="text-xs text-muted-foreground">Total RVU</span>                  </div>                  <div className="flex items-center gap-1 text-[10px] bg-emerald-500/10 text-emerald-600 px-2 py-1 rounded-full font-bold">                     <Target className="h-3 w-3" /> {targetPercentage}                  </div>               </div>               <div className="flex-1 min-h-[50px]">                  <ResponsiveContainer width="100%" height="100%">                     <BarChart data={data} barSize={20}>                        <XAxis dataKey="name" tick={{ fontSize: 10, fill: '#71717a' }} axisLine={false} tickLine={false} />                        <Tooltip                           contentStyle={{ borderRadius: '8px', border: 'none', boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1)', padding: '4px 8px', fontSize: '10px' }}                           cursor={{ fill: 'transparent' }}                        />                        <Bar dataKey="rvu" fill="#10b981" radius={[4, 4, 0, 0]} />                     </BarChart>                  </ResponsiveContainer>               </div>            </div>         </div>      </motion.div>   );};

Usage

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

Prop

Type