LaviKatiyar

Referral Card

Cards 292

About

Referral Card This component provides a visually appealing and interactive card for referral programs. It uses framer-motion for smooth animations and is built with reusability in mind, allowing you to easily customize its content through props.

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

Code

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

Usage.tsx

import * as React from "react";
import { ReferralCard } from "@/components/ui/referral-card";
import { Zap, Crown, Users } from "lucide-react";

/**
 * A demo component to showcase the ReferralCard.
 */
const ReferralCardDemo = () => {
  // Data for the "How it works" section
  const referralSteps = [
    {
      icon: <Zap className="h-4 w-4" />,
      text: "Share your invite link",
    },
    {
      icon: <Crown className="h-4 w-4" />,
      text: (
        <>
          Your friend gets <span className="font-semibold text-card-foreground">10 credits</span>{" "}
          when they subscribe
        </>
      ),
    },
    {
      icon: <Users className="h-4 w-4" />,
      text: (
        <>
          You receive <span className="font-semibold text-card-foreground">10 credits</span> for
          each referral
        </>
      ),
    },
  ];

  return (
    <div className="flex min-h-[500px] w-full items-center justify-center bg-background p-4">
      <ReferralCard
        badgeText="Earn 10+ credits"
        title="Refer & Earn"
        description="for each friend that you invite"
        imageUrl="https://www.thiings.co/_next/image?url=https%3A%2F%2Flftz25oez4aqbxpq.public.blob.vercel-storage.com%2Fimage-v0vbLLyS37IDvS2JqhJONhIAEgpeZP.png&w=320&q=75" // Replace with your image link
        steps={referralSteps}
        referralLink="https://21st.dev/lavikatiyar"
      />
    </div>
  );
};

export default ReferralCardDemo;

Dependencies

More by LaviKatiyar

View all
  • Hero Section

    Hero Section

    813
  • Cards

    Cards

    591
  • Service Card

    Service Card

    562
  • Card

    Card

    513
  • Alert Toast

    Alert Toast

    485
  • Bento Grid

    Bento Grid

    392
  • Freelancer Profile Card

    Freelancer Profile Card

    362
  • Menu

    Menu

    267

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.1K
  • Statistics Card 7

    Statistics Card 7

    301
  • Statistics Card 2

    Statistics Card 2

    272
  • Stats cards with links

    Stats cards with links

    82
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    184
  • Card Studio

    Card Studio

    35
  • Card

    Card

    70
  • Card

    Card

    18