Vector Motion
E-Commerce

Shipping Status Card - Logistics Tracking

Track shipping status and delivery progress. Monitor package tracking and customer notifications.

Shipping Status Card

The Shipping Status Card Monitor delivery tracking and shipping progress.

Preview

Installation

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

Shipping Status Card
'use client';import React from "react";import { Truck, MapPin } 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 Shipment {  id: string;  status: string;  location: string;  progress: number;  [key: string]: any;}interface ShippingStatusCardProps {  className?: string;  title?: string;  description?: string;  activeShipments?: number;  shipments?: Shipment[];}const DEFAULT_TITLE = "Shipping Status";const DEFAULT_DESCRIPTION = "Delivery Tracking";const DEFAULT_ACTIVE_SHIPMENTS = 234;const DEFAULT_SHIPMENTS: Shipment[] = [  {    id: "#ORD-1234",    status: "In Transit",    location: "Chicago, IL",    progress: 65,  },  {    id: "#ORD-1235",    status: "Out for Delivery",    location: "New York, NY",    progress: 90,  },  {    id: "#ORD-1236",    status: "Processing",    location: "Warehouse",    progress: 25,  },];export const ShippingStatusCard: React.FC<ShippingStatusCardProps> = ({  className = "",  title = DEFAULT_TITLE,  description = DEFAULT_DESCRIPTION,  activeShipments = DEFAULT_ACTIVE_SHIPMENTS,  shipments = DEFAULT_SHIPMENTS,}) => {  const isInteractive = true;  const index = 32;  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">          <Truck className="h-5 w-5 text-blue-500" />        </div>      </div>      <div className="relative z-10 flex-1">        <div className="text-2xl font-bold text-foreground mb-1">          {activeShipments}        </div>        <p className="text-sm text-muted-foreground mb-4">Active shipments</p>        <div className="space-y-3">          {shipments.map((shipment, idx) => (            <motion.div              key={idx}              initial={{ opacity: 0, x: -10 }}              animate={{ opacity: 1, x: 0 }}              transition={{ duration: 0.4, delay: idx * 0.1 }}              className="border border-zinc-200 dark:border-zinc-700 rounded-lg p-3"            >              <div className="flex justify-between items-start mb-2">                <div>                  <div className="text-sm font-medium text-foreground">                    {shipment.id}                  </div>                  <div className="flex items-center gap-1 text-xs text-muted-foreground mt-1">                    <MapPin className="h-3 w-3" />                    <span>{shipment.location}</span>                  </div>                </div>                <span className="text-xs px-2 py-1 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full font-medium">                  {shipment.status}                </span>              </div>              <div className="flex items-center gap-2">                <div className="flex-1 bg-zinc-100 dark:bg-zinc-800 rounded-full h-1.5 overflow-hidden">                  <motion.div                    initial={{ width: 0 }}                    animate={{ width: `${shipment.progress}%` }}                    transition={{ duration: 1, delay: idx * 0.1 }}                    className="h-full bg-blue-500 rounded-full"                  />                </div>                <span className="text-xs text-muted-foreground">                  {shipment.progress}%                </span>              </div>            </motion.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