Componentmedia0.6 KB gzipZero dependencies

Gift Card

Gift card with ribbon stripe, amount and balance bar.

Preview

Live Preview
$100

Jordan Daisy

Happy Birthday!

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add gift-card

Or install the full npm package:

npm install bigbullui
import { GiftCard } from "@/components/ui/gift-card";

<GiftCard />

Usage guidance

Use Gift Card when a ticket stub surface needs Gift card with ribbon stripe, amount and balance bar. Keep props minimal and prefer composition with sibling stubs.

Avoid Gift Card for long form flows or dense data grids where a dedicated layout block fits better.

Source code

gift-card.tsx

Zero dependencies (only React + utils). Copy and paste directly into your project:

"use client";

import * as React from "react";
import { cn } from "./lib/utils";

export interface GiftCardProps {
  amount: string;
  recipient: string;
  message?: string;
  className?: string;
}

const RibbonEnter = "gift-card-ribbon-enter";
const FadeIn = "gift-card-fade-in";

export function GiftCard({
  amount,
  recipient,
  message = "Happy Birthday!",
  className,
}: GiftCardProps) {
  return (
    <div
      className={cn(
        "rounded-lg border border-foreground bg-card text-card-foreground p-6 relative overflow-hidden transition-all duration-300 hover:translate-y-1 hover:shadow-lg motion-reduce:transition-none motion-reduce:translate-y-0 motion-reduce:shadow-none",
        className
      )}
    >
      {/* Amount badge */}
      <div
        className={cn(
          "absolute -top-1 -right-1 rounded-xl bg-accent text-accent-foreground text-xs font-bold uppercase tracking-wider px-2 py-1",
          RibbonEnter
        )}
      >
        {amount}
      </div>

      {/* Recipient name */}
      <h4 className="font-medium line-clamp-2 mt-4">{recipient}</h4>

      {/* Message */}
      <p className="text-sm text-muted-foreground line-clamp-2 mt-2">{message}</p>

      {/* Decorative ribbon */}
      <div
        className={cn(
          "absolute -bottom-1 -left-1 w-12 h-0.5 bg-accent",
          RibbonEnter
        )}
      />
    </div>
  );
}

Props

PropTypeDescription
amountstring
recipientstring
message?string
className?string