Education
Parent Meeting Card - Conference Management
Schedule and track parent-teacher conferences. Monitor parent meeting attendance and discussion outcomes.
Parent Meeting Card
The Parent Meeting Card displays upcoming parent-teacher conferences with dates, times, and location information.
Preview
Installation
npx shadcn@latest add https://vectormotion.vercel.app/registry/parent-meeting-card.jsonParent Meeting Card
'use client'import React from 'react';import { Users } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";import { ResponsiveContainer, PieChart, Pie, Cell, Tooltip } from 'recharts';function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs));}interface MeetingData { name: string; value: number; color: string; [key: string]: any;}interface ParentMeetingCardProps { className?: string; title?: string; subtitle?: string; totalMeetings?: number; nextMeetingTitle?: string; nextMeetingTime?: string; pendingRequests?: number; data?: MeetingData[];}const DEFAULT_DATA: MeetingData[] = [ { name: 'Academic', value: 4, color: '#14b8a6' }, { name: 'Behavioral', value: 1, color: '#f59e0b' }, { name: 'General', value: 2, color: '#3b82f6' },];const DEFAULT_TITLE = "Conferences";const DEFAULT_SUBTITLE = "Scheduled Meetings";const DEFAULT_TOTAL_MEETINGS = 7;const DEFAULT_NEXT_MEETING_TITLE = "Mr. Smith";const DEFAULT_NEXT_MEETING_TIME = "Fri 2pm";const DEFAULT_PENDING_REQUESTS = 0;export const ParentMeetingCard: React.FC<ParentMeetingCardProps> = ({ className = "", title = DEFAULT_TITLE, subtitle = DEFAULT_SUBTITLE, totalMeetings = DEFAULT_TOTAL_MEETINGS, nextMeetingTitle = DEFAULT_NEXT_MEETING_TITLE, nextMeetingTime = DEFAULT_NEXT_MEETING_TIME, pendingRequests = DEFAULT_PENDING_REQUESTS, data = DEFAULT_DATA,}) => { return ( <motion.div initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5, delay: 0.3 }} className={cn( "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all hover:border-teal-300 dark:hover:border-teal-700 hover:shadow-md flex flex-col h-full", className )} > <div className="absolute -bottom-4 -right-4 p-4 opacity-5 pointer-events-none"> <Users className="w-32 h-32 text-teal-500" /> </div> <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> <p className="text-sm text-muted-foreground font-medium"> {subtitle} </p> </div> <div className="rounded-xl bg-teal-500/10 p-2.5 text-teal-500 dark:text-teal-400 flex items-center justify-center ring-1 ring-teal-100 dark:ring-teal-800"> <Users className="h-5 w-5" /> </div> </div> <div className="flex-1 w-full min-h-[120px] relative flex items-center gap-4"> <div className="h-[100px] w-[100px] relative shrink-0"> <ResponsiveContainer width="100%" height="100%"> <PieChart> <Pie data={data} innerRadius={25} outerRadius={45} paddingAngle={5} dataKey="value" stroke="none" > {data.map((entry, index) => ( <Cell key={`cell-${index}`} fill={entry.color} /> ))} </Pie> <Tooltip cursor={false} content={() => null} /> </PieChart> </ResponsiveContainer> <div className="absolute inset-0 flex items-center justify-center"> <span className="text-lg font-bold text-foreground">{totalMeetings}</span> </div> </div> <div className="flex-1 space-y-3"> <div className="bg-muted rounded-lg p-2 border border-border"> <p className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1">Next Up</p> <div className="flex items-center justify-between"> <span className="text-xs font-bold text-foreground">{nextMeetingTitle}</span> <span className="text-[10px] bg-teal-100 text-teal-700 px-1.5 py-0.5 rounded">{nextMeetingTime}</span> </div> </div> <div className="flex justify-between text-xs px-1"> <span className="text-muted-foreground">Pending Requests</span> <span className="font-bold text-foreground">{pendingRequests}</span> </div> </div> </div> </div> </motion.div> );};Usage
This component helps teachers and administrators schedule and track parent-teacher conferences, ensuring effective communication.
Prop
Type