Pages Easy
Order Confirmation Page
An order success page with animated checkmark, order summary, delivery timeline, and continue shopping CTA. Pure CSS.
Open in Lab
MCP
css vanilla-js
Targets: JS HTML
Code
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: #f9fafb;
color: #111;
min-height: 100vh;
}
.site-header {
padding: 18px 40px;
background: #fff;
border-bottom: 1px solid #e5e7eb;
}
.logo {
font-size: 20px;
font-weight: 800;
text-decoration: none;
color: #111;
}
.content {
max-width: 640px;
margin: 40px auto;
padding: 0 24px 80px;
display: flex;
flex-direction: column;
gap: 24px;
}
/* Checkmark */
.success-icon {
display: flex;
justify-content: center;
margin-bottom: 8px;
}
.checkmark {
width: 80px;
height: 80px;
}
.circle {
stroke-dasharray: 226;
stroke-dashoffset: 226;
animation: draw-circle 0.6s ease forwards;
}
.check {
stroke-dasharray: 60;
stroke-dashoffset: 60;
animation: draw-check 0.4s 0.5s ease forwards;
}
@keyframes draw-circle {
to {
stroke-dashoffset: 0;
}
}
@keyframes draw-check {
to {
stroke-dashoffset: 0;
}
}
/* Order header */
.order-header {
text-align: center;
display: flex;
flex-direction: column;
gap: 10px;
}
.order-header h1 {
font-size: 28px;
font-weight: 800;
}
.order-header p {
font-size: 15px;
color: #555;
}
.order-number {
display: inline-block;
padding: 6px 16px;
background: #eef2ff;
color: #6366f1;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
margin: 0 auto;
}
/* Order card */
.order-card,
.delivery-card {
background: #fff;
border-radius: 16px;
border: 1px solid #e5e7eb;
padding: 24px;
}
.order-card h2,
.delivery-card h2 {
font-size: 17px;
font-weight: 700;
margin-bottom: 20px;
}
.order-items {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 20px;
border-bottom: 1px solid #f3f4f6;
padding-bottom: 20px;
}
.order-item {
display: flex;
align-items: center;
gap: 14px;
}
.item-thumb {
width: 56px;
height: 56px;
border-radius: 10px;
flex-shrink: 0;
}
.t1 {
background: linear-gradient(135deg, #c8b89a, #a8946e);
}
.t2 {
background: linear-gradient(135deg, #374151, #1f2937);
}
.item-details {
flex: 1;
}
.item-details strong {
font-size: 14px;
display: block;
}
.item-details span {
font-size: 12px;
color: #888;
}
.item-price {
font-size: 15px;
font-weight: 700;
}
.order-totals {
display: flex;
flex-direction: column;
gap: 10px;
}
.total-row {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #555;
}
.total-row.total {
font-size: 17px;
font-weight: 800;
color: #111;
padding-top: 10px;
border-top: 1px solid #f3f4f6;
}
.green {
color: #16a34a;
font-weight: 600;
}
/* Timeline */
.timeline {
display: flex;
flex-direction: column;
gap: 0;
}
.timeline-step {
display: flex;
gap: 16px;
padding-bottom: 20px;
position: relative;
}
.timeline-step:last-child {
padding-bottom: 0;
}
.timeline-step::before {
content: "";
position: absolute;
left: 9px;
top: 20px;
bottom: 0;
width: 2px;
background: #e5e7eb;
}
.timeline-step:last-child::before {
display: none;
}
.step-dot {
width: 20px;
height: 20px;
border-radius: 50%;
background: #e5e7eb;
border: 2px solid #e5e7eb;
flex-shrink: 0;
margin-top: 2px;
position: relative;
z-index: 1;
}
.timeline-step.done .step-dot {
background: #22c55e;
border-color: #22c55e;
}
.timeline-step.active .step-dot {
background: #fff;
border-color: #6366f1;
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.step-body strong {
font-size: 14px;
color: #111;
display: block;
}
.step-body span {
font-size: 12px;
color: #888;
}
/* CTA */
.cta-row {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.btn-primary {
flex: 1;
padding: 14px;
background: #111;
color: #fff;
border-radius: 12px;
text-align: center;
text-decoration: none;
font-size: 14px;
font-weight: 700;
transition: opacity 0.15s;
min-width: 140px;
}
.btn-primary:active {
opacity: 0.85;
}
.btn-secondary {
flex: 1;
padding: 14px;
background: #f3f4f6;
color: #555;
border-radius: 12px;
text-align: center;
text-decoration: none;
font-size: 14px;
font-weight: 600;
transition: background 0.15s;
min-width: 140px;
}
.btn-secondary:hover {
background: #e5e7eb;
}// Animate the checkmark on load — CSS handles it via stroke-dashoffset animations
// This script triggers the confetti burst effect on load (optional enhancement)
function confetti() {
const colors = ["#6366f1", "#22c55e", "#f59e0b", "#ef4444", "#ec4899"];
for (let i = 0; i < 60; i++) {
const dot = document.createElement("div");
dot.style.cssText = `
position: fixed;
width: ${4 + Math.random() * 6}px;
height: ${4 + Math.random() * 6}px;
background: ${colors[Math.floor(Math.random() * colors.length)]};
border-radius: 50%;
left: ${20 + Math.random() * 60}%;
top: -10px;
pointer-events: none;
z-index: 9999;
transition: transform ${0.8 + Math.random() * 0.8}s ease, opacity ${0.8 + Math.random() * 0.4}s ease;
opacity: 1;
`;
document.body.appendChild(dot);
requestAnimationFrame(() => {
requestAnimationFrame(() => {
dot.style.transform = `translateY(${200 + Math.random() * 400}px) rotate(${Math.random() * 720}deg)`;
dot.style.opacity = "0";
});
});
setTimeout(() => dot.remove(), 1600);
}
}
setTimeout(confetti, 600);<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Order Confirmed</title>
</head>
<body>
<header class="site-header">
<a href="#" class="logo">Brand</a>
</header>
<main class="content">
<div class="success-icon">
<svg class="checkmark" viewBox="0 0 80 80" fill="none">
<circle class="circle" cx="40" cy="40" r="36" stroke="#22c55e" stroke-width="3"/>
<polyline class="check" points="24,42 36,54 56,28" stroke="#22c55e" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<div class="order-header">
<h1>Order Confirmed!</h1>
<p>Thank you for your purchase. A confirmation has been sent to <strong>alex@example.com</strong></p>
<div class="order-number">Order #ORD-2026-8472</div>
</div>
<div class="order-card">
<h2>Order Summary</h2>
<div class="order-items">
<div class="order-item">
<div class="item-thumb t1"></div>
<div class="item-details"><strong>Minimal Backpack</strong><span>Sand · 20L · Qty 1</span></div>
<div class="item-price">$129.00</div>
</div>
<div class="order-item">
<div class="item-thumb t2"></div>
<div class="item-details"><strong>Canvas Tote Bag</strong><span>Black · Qty 2</span></div>
<div class="item-price">$58.00</div>
</div>
</div>
<div class="order-totals">
<div class="total-row"><span>Subtotal</span><span>$187.00</span></div>
<div class="total-row"><span>Shipping</span><span class="green">Free</span></div>
<div class="total-row"><span>Tax (8%)</span><span>$14.96</span></div>
<div class="total-row total"><span>Total</span><span>$201.96</span></div>
</div>
</div>
<div class="delivery-card">
<h2>Delivery Timeline</h2>
<div class="timeline">
<div class="timeline-step done">
<div class="step-dot"></div>
<div class="step-body"><strong>Order Placed</strong><span>March 6, 2026 · 2:41 PM</span></div>
</div>
<div class="timeline-step done">
<div class="step-dot"></div>
<div class="step-body"><strong>Payment Confirmed</strong><span>Just now</span></div>
</div>
<div class="timeline-step active">
<div class="step-dot"></div>
<div class="step-body"><strong>Processing</strong><span>Estimated 1–2 business days</span></div>
</div>
<div class="timeline-step">
<div class="step-dot"></div>
<div class="step-body"><strong>Shipped</strong><span>Estimated March 8</span></div>
</div>
<div class="timeline-step">
<div class="step-dot"></div>
<div class="step-body"><strong>Delivered</strong><span>Estimated March 10–12</span></div>
</div>
</div>
</div>
<div class="cta-row">
<a href="#" class="btn-primary">Track Order</a>
<a href="#" class="btn-secondary">Continue Shopping</a>
</div>
</main>
<script src="script.js"></script>
</body>
</html>Order Confirmation Page
A polished post-purchase confirmation page that reassures customers their order was placed successfully, shows the order summary, and sets delivery expectations with a visual timeline.
Features
- Animated SVG checkmark draw-on effect
- Order number and email confirmation notice
- Itemized order summary table
- Delivery timeline with step indicators
- “Track Order” and “Continue Shopping” CTAs
When to use it
- E-commerce checkout success route
- SaaS subscription confirmation
- Any purchase or sign-up success page