Agencies and freelancers have a pricing problem: every project is different, so the pricing page says "Contact us", and half the visitors leave without ever finding out if they can afford it.
This pricing section fixes that with a quote builder that looks like a tape measure. Visitors tick what their site needs. The tape pulls out one graduation per week of work, the case slides along to where the tape stops, and the fixed price is printed on the case. Untick something and the tape winds back in. At the end, one button emails the exact quote they built.
Here's how it works in React with Motion.
The data: phases and pieces
Everything starts from two lists. Phases run one after another (Plan, Design, Build, Launch). Pieces are the things a project can include, each with a price, a number of weeks and the phase it belongs to:
interface QuotePiece { id: string; name: string; description: string; price: number; // whole currency units weeks: number; phase: string; // the id of its phase isIncluded?: boolean; // always in the quote, can't be removed isPicked?: boolean; // ticked when the section loads } Some pieces are always included (a kick-off workshop, the homepage). Others are ticked by default so the first quote looks like a typical project, not the cheapest possible one.
Step 1: turning picks into a schedule
The heart of the component is one small pure function. Pieces inside a phase run side by side, so a phase lasts as long as its longest picked piece, and each phase starts when the one before it ends:
export function scheduleQuote(phases, pieces, picked) { const spans = []; let startWeek = 0; let totalPrice = 0; for (const phase of phases) { const chosen = pieces.filter((piece) => piece.phase === phase.id && picked.has(piece.id)); const weeks = Math.max(0, ...chosen.map((piece) => piece.weeks)); totalPrice += chosen.reduce((sum, piece) => sum + piece.price, 0); if (weeks > 0) spans.push({ id: phase.id, label: phase.label, startWeek, weeks }); startWeek += weeks; } return { spans, totalWeeks: startWeek, totalPrice }; } This is more honest than adding every piece's weeks together. Adding illustrations doesn't make the project longer if the brand refresh in the same phase already takes three weeks, and the tape shows exactly that: the price goes up, the tape doesn't move.
The tape's full length is the same function with everything ticked, so the scale never changes while you play with it:
const getLongestWeeks = (phases, pieces) => scheduleQuote(phases, pieces, new Set(pieces.map((p) => p.id))).totalWeeks; Step 2: pulling out the tape
The tape is a full-width strip with a week mark every graduation. Instead of changing its width, it's clipped: clip-path: inset() hides everything past the current length.
const reach = (schedule.totalWeeks / scaleWeeks) * 100; <motion.div initial={false} animate={{ clipPath: `inset(0 ${100 - reach}% 0 0)` }} transition={transition} className="absolute inset-x-0 top-7 h-14 bg-primary text-primary-foreground" > <TapeMarks weeks={scaleWeeks} /> <PhaseBands spans={schedule.spans} scaleWeeks={scaleWeeks} /> </motion.div> Why clip instead of width? The marks never move or squash. The tape is already printed at full length; we just reveal more of it, which is exactly what a real tape does.
Step 3: the case follows the tape
The case (with the price on it) sits in a layer that slides with an x transform to the same percentage:
<motion.div initial={false} animate={{ x: `${reach}%` }} transition={transition} className="pointer-events-none absolute inset-0"> <TapeCase totalPrice={schedule.totalPrice} totalWeeks={schedule.totalWeeks} ... /> </motion.div> Both the clip and the slide use the same soft spring, so the tape and its case move as one object. Inside the case, a dashed ring rotates 40° per week of tape, so it looks like the reel is turning as the tape comes out:
<motion.span initial={false} animate={{ rotate: totalWeeks * 40 }} transition={transition} className="absolute inset-2.5 rounded-full border-2 border-dashed" /> Only transforms and a clip-path animate, so it stays smooth even on cheap phones.
Step 4: a price that counts
The price on the case and in the summary counts up or down to its new value instead of jumping. Screen readers get the final figure once, through a visually hidden copy, while the animated one is aria-hidden:
<span className="sr-only">{formatPrice(amount, currency, locale)}</span> <motion.span aria-hidden>{text}</motion.span> Step 5: the quote goes out as an email
The button is a mailto: link whose body lists every picked piece with its price, the total and the dates. The visitor doesn't have to retype anything, and you receive the quote exactly as they built it:
const lines = pieces.map((piece) => `- ${piece.name}: ${formatPrice(piece.price, currency, locale)}`); const body = [booking.intro, "", ...lines, "", `Total: ${formatPrice(totalPrice, currency, locale)}`, dates].join("\n"); return `mailto:${booking.email}?subject=${encodeURIComponent(booking.subject)}&body=${encodeURIComponent(body)}`; The launch date is counted from a kick-off date you pass in, so the summary reads like "Kick-off Jan 11 · Live by Mar 15 · 9 weeks".
Accessibility and reduced motion
- Each piece is a real
<input type="checkbox">, listed under its phase. - The dates and total are in an
aria-live="polite"line, so screen reader users hear the new quote when they tick something. - The tape itself is decorative for the eye; the summary says the same in words.
- With reduced motion on, every transition becomes instant: the tape and case jump to their new place.
Why this works for selling
A visitor who has built their own quote has already pictured working with you. They've seen a real price, a real launch date and exactly what's included, and the next step is one click. That's a much shorter path than "Contact us for pricing".
The full component, with the phase columns, the add bars and the animated price, is free on DeliverWebsite UI: Website Cost Calculator Pricing Section


