# Order Confirmation 02

> A simple order confirmation block

A shadcn/ui block from the [@shadcnui-blocks](https://shadcnui-blocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnui-blocks/order-confirmation-02).

- Page, with a live preview: https://shadcn.exchange/r/shadcnui-blocks/order-confirmation-02
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnui-blocks/order-confirmation-02-light-5c44d285d731746b.png
- Registry item: https://shadcnui-blocks.com/r/order-confirmation-02.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnui-blocks.com/r/order-confirmation-02.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: `lucide-react`
- Registry items: `separator`

## Files

### `src/registry/blocks/radix/order-confirmation-02/components/order-confirmation.tsx`

```tsx
import { Check } from "lucide-react";
import { Separator } from "@/registry/bases/radix/ui/separator";

interface OrderItem {
  id: string;
  imageSrc: string;
  imageAlt: string;
  name: string;
  description: string;
  price: number;
  quantity: number;
}

const orderItems: OrderItem[] = [
  {
    id: "070",
    imageSrc: "https://www.fffuel.co/images/dddepth-preview/dddepth-070.jpg",
    imageAlt: "iPhone 15 Pro",
    name: "iPhone 15 Pro",
    description: "6.1-inch Super Retina XDR display with ProMotion.",
    price: 999,
    quantity: 2,
  },
  {
    id: "010",
    imageSrc: "https://www.fffuel.co/images/dddepth-preview/dddepth-010.jpg",
    imageAlt: "AirPods Pro",
    name: "AirPods Pro",
    description: "Active Noise Cancellation with Adaptive Transparency.",
    price: 249,
    quantity: 1,
  },
  {
    id: "012",
    imageSrc: "https://www.fffuel.co/images/dddepth-preview/dddepth-012.jpg",
    imageAlt: "MacBook Air M2",
    name: "MacBook Air M2",
    description: "13-inch laptop with M2 chip and 8GB unified memory.",
    price: 1199,
    quantity: 1,
  },
];

function formatCurrency(amount: number) {
  return amount.toLocaleString("en-US", {
    style: "currency",
    currency: "USD",
    maximumFractionDigits: 2,
  });
}

export default function OrderConfirmation() {
  const total = orderItems.reduce(
    (sum, item) => sum + item.price * item.quantity,
    0
  );
  return (
    <div className="flex min-h-screen items-center justify-center">
      <div className="mx-auto flex w-full max-w-lg flex-col items-center bg-background px-6 pt-8 pb-10 text-center shadow-lg/5 sm:rounded-xl sm:border md:px-8">
        <div className="flex size-12 items-center justify-center rounded-full border border-green-500/12 bg-green-500/10">
          <Check className="size-6 text-green-500" />
        </div>
        <p className="mt-7 font-medium text-[1.6rem] tracking-tight">
          Thank you for your purchase!
        </p>
        <p className="mt-4 text-muted-foreground text-sm sm:text-base">
          We've sent you an email with your order details to{" "}
          <span className="font-medium text-foreground">order@example.com</span>
          .
        </p>

        <div className="mt-12 flex w-full flex-col gap-8">
          {orderItems.map((item) => (
            <div className="flex items-center gap-4" key={item.id}>
              <div className="flex aspect-square w-14 shrink-0 items-center justify-center rounded-xl border-border/30 bg-secondary shadow-[0_0_15px_2px_rgba(0,0,0,0.1)] sm:w-18">
                <img
                  alt={item.imageAlt}
                  className="size-full select-none rounded-xl object-cover"
                  src={item.imageSrc}
                />
              </div>
              <div className="text-start">
                <p className="font-medium">{item.name}</p>
                <p className="line-clamp-2 text-muted-foreground text-sm">
                  {item.description}
                </p>
              </div>
              <div className="ms-auto flex flex-col items-end">
                <p className="font-medium text-foreground">
                  {formatCurrency(item.price)}
                </p>
                <p className="text-muted-foreground text-sm">
                  &times;{item.quantity}
                </p>
              </div>
            </div>
          ))}
          <Separator />
          <div className="flex items-center justify-between">
            <p className="text-muted-foreground">Total</p>
            <p className="font-medium text-foreground">
              {formatCurrency(total)}
            </p>
          </div>
        </div>
      </div>
    </div>
  );
}
```
