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
<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.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
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.
| Prop | Type | Required | Description |
|---|---|---|---|
steps | RemixNode | No | The progress through checkout, such as a step indicator. |
summary | RemixNode | Yes | The order, usually a collapsible OrderSummary. |
children | RemixNode | Yes | The form of the current step. |
aside | RemixNode | No | Under the summary, such as payment marks or a returns promise. |
Also accepts everything in Omit<TagProps<"div">, "children">.