Skip to content

pastetaste

Stack Order Builder

FormsInteractionCards

A numbered build-your-own order form: single and multi-choice chips with surcharges, a sticky result card with a cross-fading photo, a numbered build list and a total that follows every choice.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/stack-order-builder.tsx.

npx shadcn@latest add https://pastetaste.com/r/stack-order-builder.json

Prompt

Install the pastetaste component "Stack Order Builder" (stack-order-builder) into this Next.js project and use it.

What it is: A numbered build-your-own order form: single and multi-choice chips with surcharges, a sticky result card with a cross-fading photo, a numbered build list and a total that follows every choice.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/stack-order-builder.json
   (it writes components/pastetaste/stack-order-builder.tsx; install any npm packages it reports).
2. Import it: import { StackOrderBuilder } from "@/components/pastetaste/stack-order-builder" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- steps: BuilderStep[] — Steps with id, label, options { id, label, price? }, mode 'one' | 'many', initial and an optional line(option) for the build list.
- basePrice: number = 0 — Price every build starts from.
- extra: { label, line, price } — Optional switch under the list, such as a combo.
- photo: (selection) => { src, alt } | null — Photo for the current selection; shown photos cross-fade.
- photoNote: (selection) => ReactNode — Small print under the photo.
- heading: string = 'Your build' — Label of the total row and accessible name of the card.
- currency: string = '$' — Currency symbol.
- addLabel / doneLabel: string = 'Add to my order' / 'Added to your order' — Button text before and after pressing.
- onAdd: (build) => void — Called with { lines, price, selection, extra }.
- className / style: string / CSSProperties — On the root.

Live preview: https://pastetaste.com/c/stack-order-builder
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 10

PropTypeDefaultDescription
stepsBuilderStep[]-Steps with id, label, options { id, label, price? }, mode 'one' | 'many', initial and an optional line(option) for the build list.
basePricenumber0Price every build starts from.
extra{ label, line, price }-Optional switch under the list, such as a combo.
photo(selection) => { src, alt } | null-Photo for the current selection; shown photos cross-fade.
photoNote(selection) => ReactNode-Small print under the photo.
headingstring'Your build'Label of the total row and accessible name of the card.
currencystring'$'Currency symbol.
addLabel / doneLabelstring'Add to my order' / 'Added to your order'Button text before and after pressing.
onAdd(build) => void-Called with { lines, price, selection, extra }.
className / stylestring / CSSProperties-On the root.
View all →