Components / AI Data Visualization

AI Training Progress

A training progress dashboard showing loss curves, epoch progress, and training metrics in real-time.

Live Preview — ai-training-progress-01

Active Training Session

Epoch 42 / 100

04:22:15 remaining

Loss

0.0042

-12%

Accuracy

99.2%

+0.4%

Step/sec

1.4k

+2%
Global Progress42%

Installation

Dependencies

Install the core libraries required for this component.

npm
npm install react lucide-react

Source Code

ai-training-progress-01.tsx
"use client";

import React from "react";
import { Activity, Clock, Cpu, Layout } from "lucide-react";

export default function AITrainingProgress() {
    const steps = [
        { label: "Loss", val: "0.0042", change: -12, color: "text-emerald-500" },
        { label: "Accuracy", val: "99.2%", change: 0.4, color: "text-blue-500" },
        { label: "Step/sec", val: "1.4k", change: 2, color: "text-zinc-900 dark:text-zinc-100" },
    ];

    return (
        <div className="rounded-xl border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-6 shadow-sm w-full max-w-2xl mx-auto overflow-hidden">
            <div className="flex items-center justify-between mb-8">
                <div className="flex items-center gap-3">
                    <div className="p-2 rounded-lg bg-zinc-950">
                        <Cpu className="h-4 w-4 text-emerald-500 lg:animate-pulse" />
                    </div>
                    <div>
                        <h3 className="text-sm font-bold text-zinc-900 dark:text-zinc-100">Active Training Session</h3>
                        <p className="text-[10px] text-zinc-400 font-bold uppercase tracking-widest mt-0.5">Epoch 42 / 100</p>
                    </div>
                </div>
                <div className="text-right">
                    <p className="text-xs font-bold text-zinc-500 flex items-center gap-2">
                        <Clock className="h-3 w-3" />
                        04:22:15 remaining
                    </p>
                </div>
            </div>

            <div className="grid grid-cols-3 gap-4 mb-8">
                {steps.map((s) => (
                    <div key={s.label} className="p-4 rounded-xl bg-zinc-50 dark:bg-zinc-900/50 border border-zinc-100 dark:border-zinc-800">
                        <p className="text-[10px] font-black text-zinc-400 uppercase tracking-widest mb-1">{s.label}</p>
                        <div className="flex items-baseline justify-between capitalize">
                            <p className={`text-xl font-bold tracking-tight ${s.color}`}>{s.val}</p>
                            <span className={`text-[10px] font-bold ${s.change < 0 ? "text-emerald-500" : "text-blue-500"}`}>
                                {s.change > 0 ? "+" : ""}{s.change}%
                            </span>
                        </div>
                    </div>
                ))}
            </div>

            <div className="space-y-4">
                <div className="flex items-center justify-between">
                    <span className="text-[10px] font-black text-zinc-400 uppercase tracking-widest">Global Progress</span>
                    <span className="text-xs font-bold text-zinc-900 dark:text-zinc-100">42%</span>
                </div>
                <div className="h-2 w-full bg-zinc-100 dark:bg-zinc-800 rounded-full overflow-hidden relative">
                    <div className="h-full w-[42%] bg-emerald-500 shadow-[0_0_12px_rgba(16,185,129,0.4)]" />
                    <div className="absolute top-0 bottom-0 w-8 bg-white/20 -skew-x-12 translate-x-[-100%] animate-[shimmer_2s_infinite]" />
                </div>
            </div>
        </div>
    );
}

Functional Logic

Internal functions used to handle component logic.

Function Parameters
AITrainingProgress() None

Variables

All variable declarations found in this component.

Name Kind Value
steps const [

JSX Tags Usage

Every JSX/HTML tag used in this component, with usage count and source.

Tag Count Type Source
<Clock> Library lucide-react
<Cpu> Library lucide-react
<div> 14× Native Native HTML
<h3> Native Native HTML
<p> Native Native HTML
<span> Native Native HTML

Related Components

  • AI Confidence Gauge — A gauge chart showing AI prediction confidence levels with color gradients from red (low) to green (high).
  • AI Embedding Scatter Plot — A 2D scatter plot visualizing AI embedding clusters with interactive hover tooltips and cluster labels.
  • AI Attention Heatmap — A heatmap visualization of transformer attention weights showing token-to-token relationships.
  • AI Token Distribution — A bar chart showing token probability distributions from AI model outputs with top-k visualization.
  • AI Model Comparison Radar — A radar chart comparing multiple AI models across dimensions like speed, accuracy, cost, and reasoning.
  • AI Pipeline Flow — A flowchart visualization showing AI data pipeline stages with status indicators and throughput metrics.