Vector Motion
Education

Lesson Plan Card - Curriculum Management

Track lesson planning and curriculum delivery. Monitor lesson schedule and educational content distribution.

Lesson Plan Card

The Lesson Plan Card displays the weekly lesson plan status, showing which days have plans prepared and which are pending.

Preview

Installation

npx shadcn@latest add https://vectormotion.vercel.app/registry/lesson-plan-card.json
Lesson Plan Card
'use client'import React from 'react';import { CalendarRange } from 'lucide-react';import { motion } from 'motion/react';import { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";import { ResponsiveContainer, BarChart, Bar, Tooltip, XAxis, Cell } from 'recharts';function cn(...inputs: ClassValue[]) {  return twMerge(clsx(inputs));}interface LessonData {  day: string;  lessons: number;  status: string;  color: string;  [key: string]: any;}interface LessonPlanCardProps {  className?: string;  title?: string;  subtitle?: string;  completedValue?: string;  completedLabel?: string;  onTrackLabel?: string;  percentageDone?: string;  data?: LessonData[];}const DEFAULT_DATA: LessonData[] = [  { day: 'M', lessons: 5, status: 'Done', color: '#3b82f6' },  { day: 'T', lessons: 6, status: 'Done', color: '#3b82f6' },  { day: 'W', lessons: 4, status: 'Done', color: '#3b82f6' },  { day: 'T', lessons: 5, status: 'Pending', color: '#e4e4e7' },  { day: 'F', lessons: 5, status: 'Pending', color: '#e4e4e7' },];const DEFAULT_TITLE = "Lesson Plans";const DEFAULT_SUBTITLE = "Weekly Schedule";const DEFAULT_COMPLETED_VALUE = "15/25";const DEFAULT_COMPLETED_LABEL = "Completed";const DEFAULT_ON_TRACK_LABEL = "On Track";const DEFAULT_PERCENTAGE_DONE = "60% Done";export const LessonPlanCard: React.FC<LessonPlanCardProps> = ({  className = "",  title = DEFAULT_TITLE,  subtitle = DEFAULT_SUBTITLE,  completedValue = DEFAULT_COMPLETED_VALUE,  completedLabel = DEFAULT_COMPLETED_LABEL,  onTrackLabel = DEFAULT_ON_TRACK_LABEL,  percentageDone = DEFAULT_PERCENTAGE_DONE,  data = DEFAULT_DATA,}) => {  return (    <motion.div      initial={{ opacity: 0, y: 20 }}      animate={{ opacity: 1, y: 0 }}      transition={{ duration: 0.5, delay: 0.2 }}      className={cn(        "relative overflow-hidden rounded-2xl border border-border bg-card text-card-foreground shadow-sm transition-all hover:border-primary/50 hover:shadow-md flex flex-col h-full",        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>            <p className="text-sm text-muted-foreground font-medium">              {subtitle}            </p>          </div>          <div className="rounded-xl bg-blue-500/10 p-2.5 text-blue-500 dark:text-blue-400 flex items-center justify-center ring-1 ring-blue-100 dark:ring-blue-800">            <CalendarRange className="h-5 w-5" />          </div>        </div>        <div className="flex-1 w-full min-h-[100px]">          <ResponsiveContainer width="100%" height="100%">            <BarChart data={data}>              <XAxis                dataKey="day"                axisLine={false}                tickLine={false}                tick={{ fontSize: 10, fill: '#71717a' }}              />              <Tooltip cursor={false} content={() => null} />              <Bar dataKey="lessons" radius={[4, 4, 0, 0]}>                {data.map((entry, index) => (                  <Cell key={`cell-${index}`} fill={entry.color} />                ))}              </Bar>            </BarChart>          </ResponsiveContainer>        </div>        <div className="mt-3 flex items-center justify-between pt-3 border-t border-border">          <div>            <div className="text-2xl font-bold text-foreground">{completedValue}</div>            <div className="text-xs text-muted-foreground">{completedLabel}</div>          </div>          <div className="text-right">            <div className="text-xs font-medium text-emerald-500 bg-emerald-500/10 px-2 py-1 rounded">              {onTrackLabel}            </div>            <div className="text-[10px] text-muted-foreground mt-1">{percentageDone}</div>          </div>        </div>      </div>      <div className="absolute -bottom-4 -right-4 z-0 opacity-5 pointer-events-none">        <CalendarRange className="w-32 h-32 text-blue-500" />      </div>    </motion.div >  );};

Usage

This component helps teachers organize and track their weekly lesson planning, ensuring all days are properly prepared.

Prop

Type