Vector Motion
Education

Discipline Record Card - Student Conduct

Monitor student discipline records and conduct metrics. Track behavioral incidents and intervention effectiveness.

Discipline Record Card

The Discipline Record Card displays student conduct and discipline record status, showing incidents and overall behavior rating.

Preview

Installation

npx shadcn@latest add https://vectormotion.vercel.app/registry/discipline-record-card.json
Discipline Record Card
'use client'import React from 'react';import { ShieldCheck } 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 } from 'recharts';function cn(...inputs: ClassValue[]) {  return twMerge(clsx(inputs));}interface DisciplineData {  month: string;  incidents: number;  [key: string]: any;}interface DisciplineRecordCardProps {  className?: string;  title?: string;  subtitle?: string;  statusLabel?: string;  data?: DisciplineData[];}const DEFAULT_DATA: DisciplineData[] = [  { month: 'Aug', incidents: 2 },  { month: 'Sep', incidents: 1 },  { month: 'Oct', incidents: 0 },  { month: 'Nov', incidents: 0 },  { month: 'Dec', incidents: 0 },];const DEFAULT_TITLE = "Conduct";const DEFAULT_SUBTITLE = "Incidents Trend";const DEFAULT_STATUS_LABEL = "Clean Record";export const DisciplineRecordCard: React.FC<DisciplineRecordCardProps> = ({  className = "",  title = DEFAULT_TITLE,  subtitle = DEFAULT_SUBTITLE,  statusLabel = DEFAULT_STATUS_LABEL,  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-emerald-300 dark:hover:border-emerald-700 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>            <div className="flex items-center gap-2 mt-1">              <span className="text-xs font-medium text-emerald-500 bg-emerald-500/10 px-1.5 py-0.5 rounded-full border border-emerald-100 dark:border-emerald-900/30">                {statusLabel}              </span>            </div>            <p className="text-sm text-muted-foreground mt-1">              {subtitle}            </p>          </div>          <div className="rounded-xl bg-emerald-500/10 p-2.5 text-emerald-500 dark:text-emerald-400 flex items-center justify-center ring-1 ring-emerald-100 dark:ring-emerald-800">            <ShieldCheck 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="month"                axisLine={false}                tickLine={false}                tick={{ fontSize: 10, fill: '#71717a' }}              />              <Tooltip cursor={false} content={() => null} />              <Bar dataKey="incidents" fill="#10b981" radius={[4, 4, 0, 0]} />            </BarChart>          </ResponsiveContainer>        </div>      </div>      <div className="absolute -bottom-4 -right-4 z-0 opacity-5 pointer-events-none">        <ShieldCheck className="w-32 h-32 text-emerald-500" />      </div>    </motion.div>  );};

Usage

This component helps track student behavior and conduct records, providing a clear view of disciplinary status.

Prop

Type