VectorMotion
Medical

Maternity Ward Card - Obstetrics

Monitor maternity unit operations and deliveries. Track obstetric metrics and maternal/fetal outcomes.

Maternity Ward Card

The Maternity Ward Card Track maternity ward occupancy, deliveries, and patient status.

Preview

Installation

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

Maternity Ward Card
'use client'import React from 'react';import { Baby, Heart, Calendar } 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 MaternityWardCardProps {   className?: string;   title?: string;   subtitle?: string;   birthCount?: number;   todayCount?: string;   laborActive?: number;   inductionsScheduled?: number;}const DEFAULT_TITLE = "Maternity";const DEFAULT_SUBTITLE = "L&D Status";const DEFAULT_BIRTH_COUNT = 4;const DEFAULT_TODAY_COUNT = "+2 Today";const DEFAULT_LABOR_ACTIVE = 3;const DEFAULT_INDUCTIONS_SCHEDULED = 2;export const MaternityWardCard: React.FC<MaternityWardCardProps> = ({   className = "",   title = DEFAULT_TITLE,   subtitle = DEFAULT_SUBTITLE,   birthCount = DEFAULT_BIRTH_COUNT,   todayCount = DEFAULT_TODAY_COUNT,   laborActive = DEFAULT_LABOR_ACTIVE,   inductionsScheduled = DEFAULT_INDUCTIONS_SCHEDULED,}) => {   const isInteractive = true;   const index = 30;   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-rose-300 dark:hover:border-rose-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-rose-400"></span>                     </span>                     <p className="text-sm text-muted-foreground font-medium">                        {subtitle}                     </p>                  </div>               </div>               <div className="rounded-xl bg-rose-500/10 p-2.5 text-rose-500 dark:text-rose-400 flex items-center justify-center ring-1 ring-rose-100 dark:ring-rose-800">                  <Baby className="h-5 w-5" />               </div>            </div>            <div className="flex-1 flex flex-col justify-between">               <div className="flex items-center gap-3">                  <div className="flex items-baseline gap-1">                     <span className="text-4xl font-bold text-foreground">{birthCount}</span>                     <span className="text-sm text-muted-foreground">births</span>                  </div>                  <div className="h-8 w-px bg-zinc-100 dark:bg-zinc-800" />                  <span className="text-xs text-emerald-500 font-bold bg-emerald-50 dark:bg-emerald-900/10 px-2 py-1 rounded-full">                     {todayCount}                  </span>               </div>               <div className="space-y-2 mt-4">                  <div className="flex justify-between items-center p-2 rounded-lg bg-muted">                     <div className="flex items-center gap-2">                        <Heart className="h-4 w-4 text-rose-400" />                        <span className="text-xs font-semibold text-foreground">Labor</span>                     </div>                     <span className="text-xs font-bold text-foreground">{laborActive} Active</span>                  </div>                  <div className="flex justify-between items-center p-2 rounded-lg bg-muted">                     <div className="flex items-center gap-2">                        <Calendar className="h-4 w-4 text-blue-400" />                        <span className="text-xs font-semibold text-foreground">Inductions</span>                     </div>                     <span className="text-xs font-bold text-foreground">{inductionsScheduled} Scheduled</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

On this page

Free block

Need this in production?

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