Generic Checkout Flow

Step orchestrator for contact, shipping, payment, and review stages.

Quickstart

  1. Ensure the registry is set up in Installation.
  2. Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-checkout-flow

Usage

import { GenericCheckoutFlow } from "@/components/systems/storefront/generic-checkout-flow"

<GenericCheckoutFlow
  value={checkoutState}
  onChange={setCheckoutState}
  validateStep={(stepId, state) => validate(stepId, state)}
  onSubmit={submitOrder}
/>

API Reference

PropTypeNotes
stepsCheckoutStep[]Flow configuration
valueCheckoutFlowStateControlled checkout form state
validateStep(stepId, state) => booleanPer-step guardrail
onSubmit(state) => Promise<void> | voidFinal order submission
← Previous: Generic CartNext: AI Chat Suite