# Promo Banner 1 - Free shipping progress banner

> A storefront banner that shows remaining spend toward free shipping, a progress bar, and a confirmation message once the threshold is met.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/promo-banner1).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/promo-banner1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/promo-banner1-light-59937b3275bb29bf.png
- Registry item: https://shadcnblocks.com/r/promo-banner1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/promo-banner1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `cn`, `lucide-react`
- Registry items: `progress`

## Files

### `block/promo-banner1/promo-banner1.tsx`

```tsx
import { Truck } from "lucide-react";
import { cn } from "cn";

import { Progress } from "@/components/ui/progress";
interface PromoBanner1Props {
  threshold?: number;
  currentAmount?: number;
  className?: string;
}

const PromoBanner1 = ({
  threshold = 75,
  currentAmount = 45,
  className,
}: PromoBanner1Props) => {
  const progress = Math.min((currentAmount / threshold) * 100, 100);
  const remaining = threshold - currentAmount;
  const hasQualified = remaining <= 0;

  return (
    <div className={cn("w-full bg-primary text-primary-foreground", className)}>
      <div className="container flex items-center justify-center gap-3 py-2.5">
        <Truck className="size-4 shrink-0" />
        {hasQualified ? (
          <p className="text-sm font-medium">
            🎉 You&apos;ve unlocked FREE shipping!
          </p>
        ) : (
          <div className="flex items-center gap-3">
            <p className="shrink-0 text-sm">
              Spend{" "}
              <span className="font-semibold">${remaining.toFixed(2)}</span>{" "}
              more for <span className="font-semibold">FREE shipping</span>
            </p>
            <Progress
              value={progress}
              className="dark hidden h-1.5 w-24 sm:block"
            />
          </div>
        )}
      </div>
    </div>
  );
};

export { PromoBanner1 };
```
