pastetaste
Subscription Sheet
A right-hand sheet that builds a recurring order in four choices with a live price summary: struck list price, frequency discount, free-shipping threshold, monthly cost and an email sign-up.
Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.
Live demo. Move the mouse and scroll inside it.
Install
Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/subscription-sheet.tsx.
npx shadcn@latest add https://pastetaste.com/r/subscription-sheet.jsonPrompt
Install the pastetaste component "Subscription Sheet" (subscription-sheet) into this Next.js project and use it.
What it is: A right-hand sheet that builds a recurring order in four choices with a live price summary: struck list price, frequency discount, free-shipping threshold, monthly cost and an email sign-up.
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/subscription-sheet.json
(it writes components/pastetaste/subscription-sheet.tsx; install any npm packages it reports).
2. Import it: import { SubscriptionSheet } from "@/components/pastetaste/subscription-sheet" (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):
- products: { id; name; detail; price }[] = four coffees — Step 1 choices; price is for the smallest size.
- variants: { id; label; hint? }[] = grind options — Step 2 choices.
- sizes: { id; label; mult }[] = 250 g, 500 g, 1 kg — Step 3 choices; mult scales the price.
- frequencies: { id; label; days; off }[] = weekly, 2 weeks, 4 weeks — Step 4 choices; off is the discount, days sets the monthly figure.
- titles: [string x 4] = ['Coffee','Grind','Bag size','How often'] — Group titles.
- currency / shipping / freeFrom: string / number / number = '€' / 4.5 / 30 — Currency symbol, shipping fee and the per-delivery total above which shipping is free.
- open / onOpenChange / defaultOpen: boolean / fn / boolean = - / - / false — Controlled or uncontrolled open state.
- triggerLabel: string | null = 'Build your subscription' — Built-in trigger button text, null for none.
- heading: string = 'Build your subscription' — Sheet title.
- onSubmit: (order) => void — Called with the chosen ids, email and price per delivery.
- ink / muted / line / background / fontFamily: string = warm paper palette — Colours and font.
- className / style: string / CSSProperties — On the wrapper.
Live preview: https://pastetaste.com/c/subscription-sheet
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.Props 12
| Prop | Type | Default | Description |
|---|---|---|---|
| products | { id; name; detail; price }[] | four coffees | Step 1 choices; price is for the smallest size. |
| variants | { id; label; hint? }[] | grind options | Step 2 choices. |
| sizes | { id; label; mult }[] | 250 g, 500 g, 1 kg | Step 3 choices; mult scales the price. |
| frequencies | { id; label; days; off }[] | weekly, 2 weeks, 4 weeks | Step 4 choices; off is the discount, days sets the monthly figure. |
| titles | [string x 4] | ['Coffee','Grind','Bag size','How often'] | Group titles. |
| currency / shipping / freeFrom | string / number / number | '€' / 4.5 / 30 | Currency symbol, shipping fee and the per-delivery total above which shipping is free. |
| open / onOpenChange / defaultOpen | boolean / fn / boolean | - / - / false | Controlled or uncontrolled open state. |
| triggerLabel | string | null | 'Build your subscription' | Built-in trigger button text, null for none. |
| heading | string | 'Build your subscription' | Sheet title. |
| onSubmit | (order) => void | - | Called with the chosen ids, email and price per delivery. |
| ink / muted / line / background / fontFamily | string | warm paper palette | Colours and font. |
| className / style | string / CSSProperties | - | On the wrapper. |