terra vidhal

Checkout Cart

Component 1

About

A checkout cart with editable quantities, removable lines, delivery options, a live order summary and an order-confirmation state.

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

Code

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

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import { CheckoutCart, type CartItem, type ShippingOption } from "@/components/ui/checkout-cart";

const ITEMS: CartItem[] = [
  { id: "tote", name: "Everyday tote", variant: "Sand · Large", price: 38, quantity: 1 },
  { id: "mug", name: "Ceramic mug", variant: "Stone · 350 ml", price: 18, quantity: 2 },
  { id: "notebook", name: "Notebook set", variant: "Ruled · Set of three", price: 24, quantity: 1 },
  { id: "lamp", name: "Desk lamp", variant: "Matte black", price: 64, quantity: 1 },
];

const SHIPPING: ShippingOption[] = [
  {
    id: "standard",
    label: "Standard delivery",
    price: 0,
    eta: "4–6 business days",
  },
  {
    id: "express",
    label: "Express delivery",
    price: 12,
    eta: "2–3 business days",
  },
  {
    id: "pickup",
    label: "Collect in store",
    price: 0,
    eta: "Today after 4 pm",
  },
];

export default function CheckoutCartDemo() {
  return (
    <main className="flex min-h-screen w-full items-center justify-center bg-background px-4 py-10 sm:px-6">
      <CheckoutCart
        items={ITEMS}
        shippingOptions={SHIPPING}
        title="Checkout"
        description="Review the cart, choose delivery and place a simulated order."
        defaultShippingId="express"
        taxRate={8}
        footnote="Secure checkout. Nothing is charged in this demo."
      />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Project Timeline

    Project Timeline

    25
  • Gravity Stars Background

    Gravity Stars Background

    19
  • Kanban Board

    Kanban Board

    17
  • Notification Center

    Notification Center

    16
  • Booking Calendar

    Booking Calendar

    16
  • Kpi Counter

    Kpi Counter

    16
  • Topographic Lines

    Topographic Lines

    16
  • Audio Waveform

    Audio Waveform

    15

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.