Back to Full Page Component
Checkout Page

Checkout Page

e. Checkout Page:  i. Breadcrumb Section.  ii. Billing & Shipping Details Form.  iii. Order Summary Box.  iv. Payment Gateway Selection (COD, Card, Bkash).  v. Trust Badges & Secure Checkout Slider (using bootstrap carousel).

#Checkout Page#Full Page

Live preview

Source code

html
<div class="container py-4">
  <!-- i. Breadcrumb Section -->
  <nav aria-label="breadcrumb" class="mb-4">
    <ol class="breadcrumb bg-light p-3 rounded-4 shadow-sm">
      <li class="breadcrumb-item"><a href="#" class="text-decoration-none text-primary">Home</a></li>
      <li class="breadcrumb-item"><a href="#" class="text-decoration-none text-primary">Cart</a></li>
      <li class="breadcrumb-item active" aria-current="page">Checkout</li>
    </ol>
  </nav>

  <div class="row g-4">
    <!-- ii. Billing & Shipping Details Form -->
    <div class="col-lg-8">
      <div class="card border-0 shadow-sm rounded-4 p-4 mb-4">
        <h4 class="fw-bold mb-4"><i class="bi bi-geo-alt me-2 text-primary"></i>Billing & Shipping Details</h4>
        <form>
          <div class="row g-3">
            <div class="col-md-6">
              <label class="form-label small fw-bold">First Name</label>
              <input type="text" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="e.g. John" required>
            </div>
            <div class="col-md-6">
              <label class="form-label small fw-bold">Last Name</label>
              <input type="text" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="e.g. Doe" required>
            </div>
            <div class="col-12">
              <label class="form-label small fw-bold">Address</label>
              <input type="text" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="123 Shopping St, Dhaka" required>
            </div>
            <div class="col-md-6">
              <label class="form-label small fw-bold">Email Address</label>
              <input type="email" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="john@example.com" required>
            </div>
            <div class="col-md-6">
              <label class="form-label small fw-bold">Phone Number</label>
              <input type="tel" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="+880 1XXX-XXXXXX" required>
            </div>
            <div class="col-md-6">
              <label class="form-label small fw-bold">City</label>
              <select class="form-select rounded-pill border-light-subtle shadow-none bg-light">
                <option selected>Dhaka</option>
                <option>Chittagong</option>
                <option>Sylhet</option>
              </select>
            </div>
            <div class="col-md-6">
              <label class="form-label small fw-bold">Postcode / ZIP</label>
              <input type="text" class="form-control rounded-pill border-light-subtle shadow-none bg-light" placeholder="1200">
            </div>
            <div class="col-12">
              <div class="form-check">
                <input class="form-check-input" type="checkbox" id="saveInfo">
                <label class="form-check-label small" for="saveInfo">Save this information for next time</label>
              </div>
            </div>
          </div>
        </form>
      </div>

      <!-- iv. Payment Gateway Selection -->
      <div class="card border-0 shadow-sm rounded-4 p-4">
        <h4 class="fw-bold mb-4"><i class="bi bi-wallet2 me-2 text-primary"></i>Select Payment Method</h4>
        <div class="row g-3">
          <div class="col-md-4">
            <input type="radio" class="btn-check" name="payment" id="cod" checked>
            <label class="btn btn-outline-dark w-100 py-3 rounded-4" for="cod">
              <i class="bi bi-truck fs-3 d-block mb-2"></i>
              Cash on Delivery
            </label>
          </div>
          <div class="col-md-4">
            <input type="radio" class="btn-check" name="payment" id="card">
            <label class="btn btn-outline-dark w-100 py-3 rounded-4" for="card">
              <i class="bi bi-credit-card fs-3 d-block mb-2"></i>
              Credit / Debit Card
            </label>
          </div>
          <div class="col-md-4">
            <input type="radio" class="btn-check" name="payment" id="bkash">
            <label class="btn btn-outline-dark w-100 py-3 rounded-4" for="bkash">
              <i class="bi bi-phone fs-3 d-block mb-2"></i>
              bKash / Nagad
            </label>
          </div>
        </div>
      </div>
    </div>

    <!-- Right Side: iii. Order Summary Box -->
    <div class="col-lg-4">
      <div class="sticky-top" style="top: 100px; z-index: 1;">
        <div class="card border-0 shadow-sm rounded-4 p-4 mb-4">
          <h5 class="fw-bold mb-4">Order Summary</h5>
          <div class="d-flex align-items-center mb-3">
            <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=60" class="rounded-3 border me-3" alt="Item">
            <div class="flex-grow-1">
              <h6 class="small fw-bold mb-0">Red Sport Shoes</h6>
              <small class="text-muted">Qty: 1</small>
            </div>
            <span class="small fw-bold">$85.00</span>
          </div>
          <div class="d-flex align-items-center mb-3">
            <img src="https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=60" class="rounded-3 border me-3" alt="Item">
            <div class="flex-grow-1">
              <h6 class="small fw-bold mb-0">Studio Headphones</h6>
              <small class="text-muted">Qty: 1</small>
            </div>
            <span class="small fw-bold">$299.00</span>
          </div>
          <hr>
          <div class="d-flex justify-content-between mb-2 small text-muted">
            <span>Subtotal</span>
            <span>$384.00</span>
          </div>
          <div class="d-flex justify-content-between mb-2 small text-muted">
            <span>Shipping Fee</span>
            <span>$12.00</span>
          </div>
          <div class="d-flex justify-content-between mt-3">
            <h5 class="fw-bolder">Total Pay</h5>
            <h5 class="fw-bolder text-primary">$396.00</h5>
          </div>
          <button class="btn btn-primary w-100 btn-lg rounded-pill py-3 fw-bold mt-4 shadow">Place Order Now</button>
        </div>

        <!-- v. Trust Badges & Secure Checkout Slider -->
        <div id="trustSlider" class="carousel slide bg-light rounded-4 overflow-hidden" data-bs-ride="carousel">
          <div class="carousel-inner p-3 text-center">
            <div class="carousel-item active">
              <i class="bi bi-shield-check text-success fs-1"></i>
              <h6 class="fw-bold mt-2">SSL Secure Transaction</h6>
              <p class="small text-muted mb-0">Your data is always encrypted.</p>
            </div>
            <div class="carousel-item">
              <i class="bi bi-arrow-counterclockwise text-primary fs-1"></i>
              <h6 class="fw-bold mt-2">7 Days Return Policy</h6>
              <p class="small text-muted mb-0">Easy returns if not satisfied.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<style>
  .breadcrumb-item+.breadcrumb-item::before {
    content: ">";
  }

  .form-control:focus,
  .form-select:focus {
    background-color: #fff;
    border-color: #0d6efd;
  }

  .btn-check:checked+.btn-outline-dark {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
  }

</style>
How to use this checkout page

Add it to your project in three steps

  1. Copy the HTML from the Source code tab above and paste it inside your <div class="container"> wrapper.
  2. Make sure the Bootstrap 5 CDN CSS and JS are linked in your <head> and before </body>. Any CodeShikhi component assumes Bootstrap 5.3+ is already loaded.
  3. Swap the placeholder text, links, and images for your own content — the layout, spacing, and responsive behaviour stay intact.

The Checkout Page block is fully responsive and works on every screen from 320 px phones to 1440 px+ desktops without additional CSS.

Accessibility checklist

Ship it accessible by default

  • Use semantic HTML landmarks — <header>, <nav>, <main>, <footer> — so screen readers can navigate your page.
  • Give every image an alt attribute (empty alt="" if it's decorative).
  • Label icon-only buttons with aria-label and keep focus outlines visible.
  • Maintain a contrast ratio of at least 4.5:1 for body text against its background.
  • Test the checkout page with Tab / Shift+Tab and Enter — every interactive element should be reachable.
Step-by-step customisation

Make it match your brand

  1. Change the colour palette by overriding Bootstrap CSS variables: --bs-primary, --bs-body-bg.
  2. Adjust spacing with utility classes such as py-5, gap-4, and mt-lg-5 — no custom CSS required.
  3. Swap the typography by loading a Google Font in your <head> and setting --bs-body-font-family.
  4. Replace stock images with brand assets. Keep dimensions similar to avoid layout shift.
  5. Preview at multiple breakpoints (mobile, tablet, desktop) and tweak column spans if content wraps awkwardly.

Need the full theory? Read our Bootstrap 5 Technical Introduction Guide for grid, breakpoints, and Sass customisation in depth.

About the Checkout Page checkout page

This checkout page is part of the free CodeShikhi (কোড শিখি) Bootstrap 5 library — a growing collection of copy-paste website building blocks curated for learners and freelance developers. Every block is written in clean, semantic HTML with Bootstrap utility classes, keeps custom CSS to the minimum needed, and works without any build step. Use it as a starting point and adapt the markup, colours, and content to fit your project's brand and audience.

If you spot a bug, want a new variation, or would like to contribute an improvement, reach us via the contact page — we ship updates weekly based on community feedback.

Detailed Technical Breakdown

Detailed Technical Breakdown: Checkout Page

Browser compatibility & standards

The Checkout Page checkout page is authored against Bootstrap 5.3, which drops legacy Internet Explorer support and targets modern evergreen engines — Chrome, Edge, Firefox, Safari, and all Chromium-based mobile browsers. Because the markup relies exclusively on the standard CSS features that ship with Bootstrap (Flexbox, CSS Grid, CSS custom properties, and the responsive breakpoint system), you can safely deploy this checkout page to any browser released in the last five years without polyfills. If you need to support very old WebKit or Samsung Internet builds, load the standard Bootstrap 5 CSS from the official jsDelivr CDN — the bundled autoprefixer output already covers those vendor prefixes.

Performance impact

Performance-wise this block is intentionally light. The HTML payload for a typical Bootstrap checkout page is under 4 KB gzipped, and it shares the same Bootstrap CSS/JS bundle you are already loading — meaning the marginal cost of adding it to a page is effectively zero KB on repeat visits. There is no JavaScript framework runtime, no hydration cost, and no client-side data fetching. The only images referenced are placeholders you will replace with your own assets; when you do, serve them as WebP or AVIF, add explicit width and height attributes to prevent layout shift (CLS), and lazy-load anything below the fold with loading="lazy". These small changes typically move Lighthouse Performance scores from the mid-80s into the 95+ range on both mobile and desktop.

Utility classes used

The checkout page leans on Bootstrap's utility-first classes to stay declarative: spacing utilities (p-*, m-*, gap-*), the flex helpers (d-flex, align-items-*, justify-content-*), the grid system (container, row, col-lg-*), typography helpers (display-*, lead, text-*), and colour utilities that resolve to Bootstrap CSS variables such as --bs-primary, --bs-body-bg, and --bs-border-color. Because everything is expressed as utilities you can re-theme the entire checkout page by overriding a handful of CSS variables at the :root level — no Sass recompile required.

Exact customisation steps

  1. Copy the source HTML from the tab above and paste it inside your <body>. The outer <div class="container"> wrapper is already included so the checkout page sits on the Bootstrap grid.
  2. Replace the placeholder headings and paragraphs with your own copy. Keep heading levels in order (h1h2h3) so screen readers and search engines can parse the document outline.
  3. Swap any <img> tags for your brand assets. Match the original aspect ratio to avoid layout shift, and always fill in a meaningful alt attribute.
  4. Retune the palette by overriding CSS variables::root { --bs-primary: #4f46e5; --bs-body-bg: #ffffff; }. All utility colour classes update automatically.
  5. Test at each Bootstrap breakpoint — sm (576 px), md (768 px),lg (992 px), xl (1200 px), xxl (1400 px) — using your browser's device toolbar, and tweak column spans if long content wraps.
  6. Ship it with the standard Bootstrap 5 CDN in the <head> and the JS bundle before the closing </body>. No build step required.
Technical & Performance Integration Guide

Technical & Performance Integration Guide — Checkout Page (component)

When and why to use this component

This block is written as a self-contained Bootstrap 5 section: a single outer container, a predictable grid inside it, and no dependencies beyond the standard Bootstrap CSS and JS bundle. That makes it safe to paste into an existing page without worrying about class-name collisions or cascade conflicts.

Accessibility & ARIA attributes

Keep the heading hierarchy in order, label any icon-only control with aria-label, and give every image either a descriptive alt attribute or an empty alt="" when it is decorative. Interactive elements must be real <button> or <a> tags so they are reachable with Tab and activatable with Enter. If the block includes a collapsible or dismissible element, preserve Bootstrap's data-bs-* attributes — they generate the aria-expanded and aria-controls wiring for you.

Performance notes for this pattern

The markup is under a few kilobytes gzipped and reuses the Bootstrap bundle already on the page, so the marginal cost of adding it is close to zero. Replace placeholder images with optimised WebP or AVIF files, declare width and height to keep Cumulative Layout Shift at zero, and add loading="lazy" to anything that renders below the fold.

Three customisation tricks

  • Override --bs-primary and --bs-body-font-family at :root to rebrand the block without touching its markup.
  • Adjust rhythm with spacing utilities (py-5, gap-4, mt-lg-5) instead of writing custom CSS.
  • Test at every Bootstrap breakpoint and change only the column spans when long copy wraps awkwardly.

Mistakes to avoid

  • Removing the .container wrapper, which makes the content run to the viewport edges.
  • Pasting the block twice on one page when it is meant to appear once.

More designs in this section