Skip to content

pastetaste

Photo Configurator

FormsInteractionSections

A configurator for photographed products: a sticky photo that cross-fades with the frame you pick, numbered groups of rows, photo tiles, pills and a switch, and a total that ticks as you choose.

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/photo-configurator.tsx.

npx shadcn@latest add https://pastetaste.com/r/photo-configurator.json

Prompt

Install the pastetaste component "Photo Configurator" (photo-configurator) into this Next.js project and use it.

What it is: A configurator for photographed products: a sticky photo that cross-fades with the frame you pick, numbered groups of rows, photo tiles, pills and a switch, and a total that ticks as you choose.

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/photo-configurator.json
   (it writes components/pastetaste/photo-configurator.tsx; install any npm packages it reports).
2. Import it: import { PhotoConfigurator } from "@/components/pastetaste/photo-configurator" (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):
- groups: { id; title; hint?; kind: 'rows'|'tiles'|'pills'|'switch'; options: { id; label; note?; price?; image? }[]; default?; drivesImage? }[] = glasses: model, frame, size, lenses, prescription — The option groups. A switch uses its first option.
- basePrice: number = 0 — Added to the total before the options.
- heading / priceNote: string = 'Pick a frame. We cut the lenses.' / 'Charged when it ships' — Title above the options and the note by the total.
- image / alt: string = - — Main photo when no group has drivesImage; alt is its text.
- currency / addLabel / addedLabel: string = '$' / 'Add to bag' / 'Added to your bag' — Text labels of the form.
- onAdd: (selection, total) => void = - — Called when the add button is pressed.
- ink / muted / line / background / tile / fontFamily: string = cool grey palette — Colours and font.
- className / style: string / CSSProperties — On the section.

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

Props 8

PropTypeDefaultDescription
groups{ id; title; hint?; kind: 'rows'|'tiles'|'pills'|'switch'; options: { id; label; note?; price?; image? }[]; default?; drivesImage? }[]glasses: model, frame, size, lenses, prescriptionThe option groups. A switch uses its first option.
basePricenumber0Added to the total before the options.
heading / priceNotestring'Pick a frame. We cut the lenses.' / 'Charged when it ships'Title above the options and the note by the total.
image / altstring-Main photo when no group has drivesImage; alt is its text.
currency / addLabel / addedLabelstring'$' / 'Add to bag' / 'Added to your bag'Text labels of the form.
onAdd(selection, total) => void-Called when the add button is pressed.
ink / muted / line / background / tile / fontFamilystringcool grey paletteColours and font.
className / stylestring / CSSProperties-On the section.
View all →