Vector Motion
E-Commerce

Conversion Rate Card - Sales Performance

Track conversion rate metrics across channels and campaigns. Monitor sales funnel performance and identify growth opportunities.

Conversion Rate Card

The Conversion Rate Card Monitor conversion funnel and rate optimization.

Preview

Installation

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

Conversion Rate Card
'use client';import React from "react";import { Target, TrendingUp } 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 ConversionRateCardProps {  className?: string;  title?: string;  rate?: string;  change?: number;}const DEFAULT_TITLE = "Conversion Rate";const DEFAULT_RATE = "2.54%";const DEFAULT_CHANGE = 0.2;export const ConversionRateCard: React.FC<ConversionRateCardProps> = ({  className = "",  title = DEFAULT_TITLE,  rate = DEFAULT_RATE,  change = DEFAULT_CHANGE,}) => {  const isInteractive = true;  const index = 30;  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>          <p className="text-sm text-muted-foreground mt-1">            All traffic sources          </p>        </div>        <div className="rounded-full bg-zinc-100 dark:bg-zinc-800 p-2 text-foreground flex items-center justify-center">          <Target className="h-5 w-5 text-emerald-500" />        </div>      </div>      <div className="relative z-10 flex-1 flex flex-col justify-end">        <div className="text-3xl font-bold text-foreground mb-1">{rate}</div>        <div className="flex items-center gap-2">          <TrendingUp className="h-4 w-4 text-emerald-500" />          <p className="text-sm text-muted-foreground">            <span className="text-emerald-500">+{change}%</span> vs last month          </p>        </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