LaviKatiyar

Card

Cards 202

About

Animated Steps Tracker Card This component provides a visually engaging way to display step-count data for a given period. It features a fluid counter animation for the total steps and a staggered bar chart animation, making data presentation dynamic and modern. It is fully themeable using shadcn/ui CSS variables.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Card to your project and fits it to your theme.

Code

How Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

// demo.tsx

import React from 'react';
import { Footprints } from 'lucide-react'; // Using lucide-react for the icon
import { MinimalStepsCard } from '@/components/ui/card-6';

// Generate some sample data to populate the chart
const generateSampleData = (days: number) => {
  return Array.from({ length: days }, () => ({
    value: Math.floor(Math.random() * 20000) + 1000, // Steps between 1k and 21k
  }));
};

const MinimalStepsCardDemo = () => {
  // Generate data for 45 bars to fill the space nicely
  const chartData = generateSampleData(45);
  const totalSteps = chartData.reduce((sum, day) => sum + day.value, 0);

  return (
    <div className="flex h-screen w-full items-center justify-center bg-background p-4">
      <MinimalStepsCard
        title="Monthly Steps"
        subtitle="January 2025"
        totalSteps={294944} // Using the number from the image for visual consistency
        icon={<Footprints className="h-5 w-5 text-muted-foreground" />}
        data={chartData}
      />
    </div>
  );
};

export default MinimalStepsCardDemo;

Dependencies

More by LaviKatiyar

View all
  • Hero Section

    Hero Section

    799
  • Cards

    Cards

    558
  • Service Card

    Service Card

    544
  • Card

    Card

    500
  • Alert Toast

    Alert Toast

    481
  • Bento Grid

    Bento Grid

    381
  • Freelancer Profile Card

    Freelancer Profile Card

    357
  • Referral Card

    Referral Card

    289

More in Cards

View all
  • Stats cards with links

    Stats cards with links

    120
  • Course Design Cards

    Course Design Cards

    1.1K
  • Statistics Card 2

    Statistics Card 2

    259
  • Card

    Card

    56
  • Card Studio

    Card Studio

    9
  • Statistics Card 7

    Statistics Card 7

    289
  • The Item one

    The Item one

    3
  • Weather Card

    Weather Card

    53