Skip to content

purple-dot/browser-examples

Repository files navigation

Browser examples

This repository shows how to use @purple-dot/browser to build a headless pre-order integration with Purple Dot.

Points of interest

  • main.tsx: entrypoint where Purple Dot is configured.

  • AddToCardButton.tsx: uses the availability API to determine if an item is on pre-order or out of stock.

  • PreOrderButton.tsx: adds a pre-order item to the cart and then shows the checkout modal.

  • PreOrderExpressButton.tsx: simultaneously adds an item to the cart and shows the checkout modal.

Running the demo

pnpm install
pnpm dev

Navigate to http://localhost:5173 to view the demo.

Further reading

Please see the @purple-dot/browser package and related documentation to learn more.

About

Examples of using @purple-dot/browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •