Vector Motion
E-Commerce

Order Processing Card - Fulfillment Status

Track order processing pipeline and status tracking. Monitor order flow from placement to fulfillment.

Order Processing Card

The Order Processing Card Track order status and processing workflow.

Preview

Installation

ash npx shadcn@latest add https://vectormotion.vercel.app/registry/order-processing-card.json

Order Processing Card
'use client';import React from "react";import { Package, Clock } 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 Status {  status: string;  count: number;  color: string;  [key: string]: any;}interface OrderProcessingCardProps {  className?: string;  title?: string;  description?: string;  statuses?: Status[];}const DEFAULT_TITLE = "Order Processing";const DEFAULT_DESCRIPTION = "Order Status";const DEFAULT_STATUSES: Status[] = [  { status: "Processing", count: 145, color: "bg-blue-500" },  { status: "Packed", count: 89, color: "bg-purple-500" },  { status: "Shipped", count: 234, color: "bg-emerald-500" },  { status: "Delivered", count: 567, color: "bg-zinc-400" },];export const OrderProcessingCard: React.FC<OrderProcessingCardProps> = ({  className = "",  title = DEFAULT_TITLE,  description = DEFAULT_DESCRIPTION,  statuses = DEFAULT_STATUSES,}) => {  const isInteractive = true;  const index = 31;  const totalOrders = statuses.reduce((sum, s) => sum + s.count, 0);  return (    <motion.div      layoutId={isInteractive ? `card-${index}-${title}` : undefined}      transition={{ duration: 0.4, ease: "easeOut" }}      className={cn(        "relative overflow-hidden rounded-xl border border-border bg-card text-card-foreground p-6 shadow-sm transition-all flex flex-col group",        isInteractive          ? "cursor-pointer hover:border-zinc-300 dark:hover:border-zinc-700"          : "",        className,      )}    >      <div className="mb-4 flex items-start justify-between relative z-10">        <div>          <h3 className="font-semibold text-lg tracking-tight text-foreground">            {title}          </h3>          {description && (            <p className="text-sm text-muted-foreground mt-1">{description}</p>          )}        </div>        <div className="rounded-full bg-zinc-100 dark:bg-zinc-800 p-2 text-foreground flex items-center justify-center">          <Package className="h-5 w-5 text-blue-500" />        </div>      </div>      <div className="relative z-10 flex-1">        <div className="text-3xl font-bold text-foreground mb-1">          {totalOrders}        </div>        <p className="text-sm text-muted-foreground mb-4">Active orders</p>        <div className="space-y-3">          {statuses.map((item, idx) => {            const percentage = Math.round((item.count / totalOrders) * 100);            return (              <div key={idx}>                <div className="flex justify-between items-center mb-1">                  <span className="text-sm text-foreground">{item.status}</span>                  <span className="text-sm font-bold text-foreground">                    {item.count}                  </span>                </div>                <div className="flex items-center gap-2">                  <div className="flex-1 bg-zinc-100 dark:bg-zinc-800 rounded-full h-2 overflow-hidden">                    <motion.div                      initial={{ width: 0 }}                      animate={{ width: `${percentage}%` }}                      transition={{ duration: 1, delay: idx * 0.1 }}                      className={`h-full ${item.color} rounded-full`}                    />                  </div>                  <span className="text-xs text-muted-foreground w-8 text-right">                    {percentage}%                  </span>                </div>              </div>            );          })}        </div>      </div>    </motion.div>  );};

Usage

This component is a data-rich dashboard card displaying e-commerce metrics with animated visualizations and dark mode support. Perfect for dashboards, landing pages, and analytics interfaces.

Prop

Type