Team Discount Calculator
A quantity stepper for team seats with tiered discount logic (e.g. 1-4 seats: no discount, 5-9: 10% off, 10-19: 20% off, 20+: 30% off) computed inline from the quantity. A live summary shows subtotal, discount amount, and final total as the quantity changes. Perfect for group ticket sales and team registrations.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/team-discount-calculator.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/event/event6.tsx instead.
Usage
The file also exports event6Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Event6, event6Demo } from "@/components/blocks/event/event6"; export default function Page() { return <Event6 {...event6Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | "Group pricing" | Small label above the heading. |
| heading | string | "Team Discount Calculator" | Section heading. |
| description | string | "Bringing your team? The more seats you add, the more everyone saves." | Supporting copy under the heading. |
| pricePerSeat | number | none | Base price per seat before any discount is applied. |
| tiers | DiscountTier[] | none | Ordered discount tiers keyed by minimum quantity. |
| className | string | none | Extra classes for the outer section element. |
Types
interface DiscountTier { minQuantity: number; label: string; /** e.g. 0.1 = 10% off */ rate: number; }
Behavior notes
- The quantity stepper is real client-side state (useState<number>, clamped to a minimum of 1) — the +/- buttons directly change the seat count.
- The active discount tier, subtotal, discount amount, and total are all derived inline during render from the quantity state, no useEffect involved.
- The Continue to registration button is decorative and has no real checkout handler wired up.
More Event Blocks
View all →conference-hero-with-image
Conference Hero with Image
Split hero with a featured photo, date badge, location, attendee stat, and dual CTAs.
minimal-event-hero
Minimal Event Hero
Centered, image-free hero with an oversized heading, date/location line, and two CTAs.
event-hero-with-ticket-pricing
Event Hero with Ticket Pricing
Centered hero with an early-bird price, a strikethrough original price, and a deadline note.
event-hero-with-social-proof
Event Hero with Social Proof
Hero with a heading, a 3-stat strip (attendees/speakers/countries), and a trusted-by company row.
personal-schedule-builder
Personal Schedule Builder
Interactive session picker that lets attendees build their own conference agenda.
ticket-selection-cart
Ticket Selection Cart
Multi-tier ticket selector with per-tier quantity steppers and a live cart total.