merce.STACK
merce.STACK
Skip to content
PricingWhat's new
Log inGet started
{}Developers
GuidesAPI referenceChangelogGet API keys →
  • Get started

    • Quickstart
    • Keys & authentication
  • Storefront

    • Products & catalog
    • Carts
    • Checkout & payment
    • Customer accounts
    • Digital products
    • Without a build step
    • Bookings
    • Courses
    • Drop-in components
  • Server API

    • Server API
    • Customers
    • Payment links & transactions
    • Balance & payouts
    • Classes & students
    • Node SDK
  • Email API

    • Email API
    • Sending email
    • Delivery events
  • Events & errors

    • Webhooks
    • Errors
  • Reference

    • API reference
    • Changelog

Storefront

Drop-in components

A product grid, checkout button, booking widget and course list for React — styled by your site.

Shell
npm install @mercestack/commerce @mercestack/commerce-react
TypeScript
import {
  CommerceProvider,
  ProductGrid,
  CheckoutButton,
  BookingWidget,
  CourseList,
} from "@mercestack/commerce-react";

export default function Site() {
  return (
    <CommerceProvider publicKey="pk_live_…">
      <header><CheckoutButton /></header>
      <ProductGrid productHref={(product) => `/products/${product.handle}`} />
      <BookingWidget />          {/* or <BookingWidget handle="ada" /> */}
      <CourseList />
    </CommerceProvider>
  );
}

Styling

They inherit your font and text colour. Set the accent and corners with CSS variables, and reach anything else through the data-ms attributes every part carries.

HTML
<style>
  :root {
    --ms-accent: #e11d48;          /* buttons and the selected state */
    --ms-accent-contrast: #fff;    /* text on the accent */
    --ms-radius: 999px;            /* corners */
    --ms-border: rgba(0,0,0,.1);
    --ms-muted: rgba(0,0,0,.55);
  }
  [data-ms="product-card"] { box-shadow: 0 8px 24px rgba(0,0,0,.06); }
</style>

Hooks, for your own markup

TypeScript
const { products } = useProducts();
const { addToCart, count } = useCart();
const { pages } = useBookingPages();
const { slots } = useBookingSlots(handle, typeSlug, { from, to });
const { courses } = useCourses();

Payments

Every payment happens on the workspace's own payment page — the components send the visitor there and never touch card details.

← PreviousCoursesNext →Server API

On this page

  • Styling
  • Hooks, for your own markup
Create a workspaceTalk to usPricing

One workspace for everything your business runs on — your team, customers, store, marketing and payouts in one place.

Get started

Product

  • All products
  • Pricing
  • What's new
  • Security

Resources

  • Documentation
  • Guides
  • Use cases
  • Blog
  • Get support

Company

  • About
  • Careers
  • Contact us
  • Talk to the team

Legal

  • Privacy
  • Terms
  • Cookie policy
  • GDPR
  • Report a vulnerability

© 2026 Mercestack. All rights reserved.

Mercestack StructureOS

mercestack