SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

CheckoutLayout

The frame of a checkout page.

Show order summary€84.15

Order summary

  • Tidepool50×70 · Oak frame€64.00
  • Fern studyInstant download€20.00
Subtotal
€84.00
Shipping
€4.95
WALLS10
−€4.80
Total
€84.15

Free returns within 30 days.

View code
tsx
<CheckoutLayout
	steps={
		<StepIndicator label="Checkout steps">
			<StepIndicator.Step number={1} state="complete" href="/checkout/contact">Contact</StepIndicator.Step>
			<StepIndicator.Step number={2} state="current">Shipping</StepIndicator.Step>
			<StepIndicator.Step number={3} state="upcoming">Payment</StepIndicator.Step>
		</StepIndicator>
	}
	summary={<OrderSummary collapsible lines={lines} breakdown={breakdown} total="€84.15" labels={labels} />}
	aside={<p>Free returns within 30 days.</p>}
>
	<form method="post" action="/checkout/shipping">…</form>
</CheckoutLayout>

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { CheckoutLayout } from "@sdxc/ui/commerce";

Renders one column on a phone, summary then steps then form. From 56rem the form takes the flexible column and the summary a 24rem column on a tinted band, sticky to the top so the total stays in view; the whole frame stops at 70rem.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
stepsRemixNodeNoThe progress through checkout, such as a step indicator.
summaryRemixNodeYesThe order, usually a collapsible OrderSummary.
childrenRemixNodeYesThe form of the current step.
asideRemixNodeNoUnder the summary, such as payment marks or a returns promise.

Also accepts everything in Omit<TagProps<"div">, "children">.

@sdxc/ui

Can’t find it? Contact us