Vector Motion
E-Commerce

Bounce Rate Card - Website Analytics

Monitor website bounce rates and visitor engagement. Analyze page performance and improve user experience metrics.

Bounce Rate Card

The Bounce Rate Card Track page engagement and bounce rate metrics.

Preview

Installation

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

Bounce Rate Card
'use client';import React from "react";import { TrendingDown, Users } 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 BounceRateCardProps {  className?: string;  title?: string;  rate?: string;  change?: number;}const DEFAULT_TITLE = "Bounce Rate";const DEFAULT_RATE = "33.5%";const DEFAULT_CHANGE = -2.1;export const BounceRateCard: React.FC<BounceRateCardProps> = ({  className = "",  title = DEFAULT_TITLE,  rate = DEFAULT_RATE,  change = DEFAULT_CHANGE,}) => {  const isInteractive = true;  const index = 26;  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">            vs. previous 30 days          </p>        </div>        <div className="rounded-full bg-zinc-100 dark:bg-zinc-800 p-2 text-foreground flex items-center justify-center">          <Users className="h-5 w-5 text-red-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">          <TrendingDown className="h-4 w-4 text-emerald-500" />          <p className="text-sm text-muted-foreground">            <span className="text-emerald-500">{change}%</span> improvement          </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