{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-section",
  "type": "registry:component",
  "title": "Pricing Section",
  "description": "Three pricing tiers with a sliding monthly/yearly toggle, crossfading prices, feature checklists and a highlighted most-popular plan.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "pricing",
    "pricing",
    "plans",
    "tiers",
    "toggle",
    "billing",
    "section",
    "marketing"
  ],
  "docs": "https://hyperblur.dev/effects/pricing-section",
  "files": [
    {
      "path": "registry/hyperblur/pricing-section.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/pricing-section.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface PricingTier {\n  name: string;\n  price: { monthly: number | string; yearly: number | string };\n  description?: string;\n  features: string[];\n  cta: { label: string; href: string };\n  highlighted?: boolean;\n}\n\nexport interface PricingSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  tiers?: PricingTier[];\n  accent?: string;\n  currency?: string;\n  yearlyDiscountLabel?: string;\n  popularLabel?: string;\n  defaultPeriod?: \"monthly\" | \"yearly\";\n}\n\nconst css = `\n.hb-ps {\n  --hb-accent: #2f7bff;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 88px 24px;\n  background: #0a0a0a;\n  color: #f2f2f5;\n  font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-ps *, .hb-ps *::before, .hb-ps *::after { box-sizing: border-box; }\n.hb-ps-inner { max-width: 1080px; margin: 0 auto; }\n.hb-ps-head { display: flex; flex-direction: column; align-items: center; text-align: center; }\n.hb-ps-title {\n  max-width: 720px;\n  margin: 0;\n  font-size: clamp(30px, 4.6vw, 48px);\n  font-weight: 700;\n  line-height: 1.1;\n  letter-spacing: -.03em;\n  text-wrap: balance;\n}\n.hb-ps-sub {\n  max-width: 540px;\n  margin: 16px 0 0;\n  color: rgba(255, 255, 255, .6);\n  font-size: 17px;\n  line-height: 1.55;\n  text-wrap: pretty;\n}\n.hb-ps-toggle {\n  position: relative;\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  margin-top: 32px;\n  padding: 4px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .04);\n}\n.hb-ps-thumb {\n  position: absolute;\n  top: 4px;\n  bottom: 4px;\n  left: 4px;\n  width: calc(50% - 4px);\n  border-radius: 999px;\n  background: var(--hb-accent);\n  box-shadow: 0 6px 20px -6px var(--hb-accent);\n  transition: transform .35s cubic-bezier(.3, 1.2, .4, 1);\n}\n.hb-ps-toggle[data-period=\"yearly\"] .hb-ps-thumb { transform: translate3d(100%, 0, 0); }\n.hb-ps-opt {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  min-height: 38px;\n  padding: 0 20px;\n  border: 0;\n  border-radius: 999px;\n  background: transparent;\n  color: rgba(255, 255, 255, .6);\n  font: inherit;\n  font-size: 14px;\n  font-weight: 600;\n  line-height: 1;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: color .25s ease;\n}\n.hb-ps-opt:hover { color: #fff; }\n.hb-ps-opt[aria-pressed=\"true\"] { color: #fff; }\n.hb-ps-opt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }\n.hb-ps-save {\n  padding: 3px 8px;\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .14);\n  font-size: 11px;\n  font-weight: 600;\n  letter-spacing: .01em;\n}\n.hb-ps-grid {\n  display: grid;\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n  gap: 20px;\n  align-items: stretch;\n  margin: 56px 0 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-ps-card {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  min-width: 0;\n  padding: 28px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 20px;\n  background: rgba(255, 255, 255, .03);\n  transition: transform .3s cubic-bezier(.22, .8, .24, 1), border-color .3s ease;\n}\n.hb-ps-card:hover { transform: translate3d(0, -3px, 0); border-color: rgba(255, 255, 255, .22); }\n.hb-ps-card[data-highlighted=\"true\"] {\n  border-color: var(--hb-accent);\n  background:\n    linear-gradient(180deg, color-mix(in srgb, var(--hb-accent) 14%, transparent), transparent 55%),\n    rgba(255, 255, 255, .03);\n  box-shadow: 0 24px 60px -28px var(--hb-accent);\n}\n.hb-ps-badge {\n  position: absolute;\n  top: 0;\n  left: 50%;\n  transform: translate3d(-50%, -50%, 0);\n  padding: 5px 12px;\n  border-radius: 999px;\n  background: var(--hb-accent);\n  color: #fff;\n  font-size: 12px;\n  font-weight: 600;\n  line-height: 1.2;\n  white-space: nowrap;\n}\n.hb-ps-name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }\n.hb-ps-desc { min-height: 42px; margin: 8px 0 0; color: rgba(255, 255, 255, .6); font-size: 14px; line-height: 1.5; }\n.hb-ps-price { display: grid; }\n.hb-ps-pv {\n  grid-area: 1 / 1;\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  opacity: 0;\n  transform: translate3d(0, 8px, 0);\n  pointer-events: none;\n  transition: opacity .22s ease, transform .22s ease;\n}\n.hb-ps-price[data-period=\"monthly\"] .hb-ps-pv[data-for=\"monthly\"],\n.hb-ps-price[data-period=\"yearly\"] .hb-ps-pv[data-for=\"yearly\"] {\n  opacity: 1;\n  transform: none;\n  pointer-events: auto;\n}\n.hb-ps-amount { display: flex; align-items: baseline; gap: 4px; }\n.hb-ps-num { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }\n.hb-ps-per { color: rgba(255, 255, 255, .5); font-size: 14px; }\n.hb-ps-note { color: rgba(255, 255, 255, .45); font-size: 12px; line-height: 1.2; }\n.hb-ps-list {\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: column;\n  gap: 12px;\n  margin: 0;\n  padding: 24px 0 0;\n  border-top: 1px solid rgba(255, 255, 255, .08);\n  list-style: none;\n  font-size: 14px;\n  line-height: 1.4;\n  color: rgba(255, 255, 255, .8);\n}\n.hb-ps-list li { display: flex; align-items: flex-start; gap: 10px; }\n.hb-ps-check {\n  flex: none;\n  display: grid;\n  place-items: center;\n  width: 18px;\n  height: 18px;\n  margin-top: 1px;\n  border-radius: 50%;\n  background: color-mix(in srgb, var(--hb-accent) 22%, transparent);\n  color: var(--hb-accent);\n}\n.hb-ps-cta {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  min-height: 46px;\n  padding: 0 24px;\n  border: 1px solid rgba(255, 255, 255, .2);\n  border-radius: 999px;\n  background: transparent;\n  color: #f2f2f5;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 600;\n  line-height: 1;\n  text-decoration: none;\n  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;\n}\n.hb-ps-cta:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); }\n.hb-ps-cta:focus-visible { outline: 2px solid var(--hb-accent); outline-offset: 3px; }\n.hb-ps-card[data-highlighted=\"true\"] .hb-ps-cta {\n  border-color: var(--hb-accent);\n  background: var(--hb-accent);\n  color: #fff;\n  box-shadow: 0 8px 28px -8px var(--hb-accent);\n}\n.hb-ps-card[data-highlighted=\"true\"] .hb-ps-cta:hover { background: color-mix(in srgb, var(--hb-accent) 82%, #ffffff); border-color: transparent; }\n@media (max-width: 767px) {\n  .hb-ps { padding: 64px 20px; }\n  .hb-ps-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 44px; }\n  .hb-ps-card { padding: 24px; }\n  .hb-ps-desc { min-height: 0; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ps-thumb, .hb-ps-opt, .hb-ps-pv, .hb-ps-card, .hb-ps-cta { transition: none; }\n  .hb-ps-card:hover { transform: none; }\n}\n`;\n\nconst defaultTiers: PricingTier[] = [\n  {\n    name: \"Starter\",\n    price: { monthly: 0, yearly: 0 },\n    description: \"For side projects and early experiments.\",\n    features: [\"1 project\", \"Community support\", \"Basic analytics\", \"1 GB storage\"],\n    cta: { label: \"Get started\", href: \"#\" },\n  },\n  {\n    name: \"Pro\",\n    price: { monthly: 24, yearly: 19 },\n    description: \"For growing teams that ship every week.\",\n    features: [\"Unlimited projects\", \"Priority support\", \"Advanced analytics\", \"100 GB storage\", \"Custom domains\"],\n    cta: { label: \"Start free trial\", href: \"#\" },\n    highlighted: true,\n  },\n  {\n    name: \"Team\",\n    price: { monthly: 64, yearly: 51 },\n    description: \"For organizations that need control and scale.\",\n    features: [\"Everything in Pro\", \"SSO and audit logs\", \"Role-based access\", \"1 TB storage\", \"Dedicated manager\"],\n    cta: { label: \"Contact sales\", href: \"#\" },\n  },\n];\n\nfunction Check() {\n  return (\n    <span className=\"hb-ps-check\" aria-hidden=\"true\">\n      <svg width=\"11\" height=\"11\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n        <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n      </svg>\n    </span>\n  );\n}\n\nfunction PriceView({\n  value,\n  period,\n  active,\n  currency,\n}: {\n  value: number | string;\n  period: \"monthly\" | \"yearly\";\n  active: boolean;\n  currency: string;\n}) {\n  const numeric = typeof value === \"number\";\n  const note = numeric && value > 0 ? (period === \"monthly\" ? \"Billed monthly\" : \"Billed yearly\") : \" \";\n  return (\n    <div className=\"hb-ps-pv\" data-for={period} aria-hidden={!active}>\n      <div className=\"hb-ps-amount\">\n        <span className=\"hb-ps-num\">{numeric ? `${currency}${value}` : value}</span>\n        {numeric ? <span className=\"hb-ps-per\">/month</span> : null}\n      </div>\n      <span className=\"hb-ps-note\">{note}</span>\n    </div>\n  );\n}\n\nexport function PricingSection({\n  title = \"Simple pricing that scales with you\",\n  subtitle = \"Start free and upgrade when you grow. No hidden fees, no surprises.\",\n  tiers = defaultTiers,\n  accent = \"#2f7bff\",\n  currency = \"$\",\n  yearlyDiscountLabel = \"Save 20%\",\n  popularLabel = \"Most popular\",\n  defaultPeriod = \"monthly\",\n  className = \"\",\n  style,\n  ...rest\n}: PricingSectionProps) {\n  const [period, setPeriod] = React.useState<\"monthly\" | \"yearly\">(defaultPeriod);\n  const vars = { \"--hb-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-ps ${className}`} style={vars} {...rest}>\n      <style href=\"hb-pricing-section\" precedence=\"default\">{css}</style>\n      <div className=\"hb-ps-inner\">\n        <div className=\"hb-ps-head\">\n          <h2 className=\"hb-ps-title\">{title}</h2>\n          {subtitle ? <p className=\"hb-ps-sub\">{subtitle}</p> : null}\n          <div className=\"hb-ps-toggle\" role=\"group\" aria-label=\"Billing period\" data-period={period}>\n            <span className=\"hb-ps-thumb\" aria-hidden=\"true\" />\n            <button type=\"button\" className=\"hb-ps-opt\" aria-pressed={period === \"monthly\"} onClick={() => setPeriod(\"monthly\")}>\n              Monthly\n            </button>\n            <button type=\"button\" className=\"hb-ps-opt\" aria-pressed={period === \"yearly\"} onClick={() => setPeriod(\"yearly\")}>\n              Yearly\n              {yearlyDiscountLabel ? <span className=\"hb-ps-save\">{yearlyDiscountLabel}</span> : null}\n            </button>\n          </div>\n        </div>\n        <ul className=\"hb-ps-grid\">\n          {tiers.map((tier) => (\n            <li className=\"hb-ps-card\" key={tier.name} data-highlighted={tier.highlighted ? \"true\" : \"false\"}>\n              {tier.highlighted ? <span className=\"hb-ps-badge\">{popularLabel}</span> : null}\n              <div>\n                <h3 className=\"hb-ps-name\">{tier.name}</h3>\n                {tier.description ? <p className=\"hb-ps-desc\">{tier.description}</p> : null}\n              </div>\n              <div className=\"hb-ps-price\" data-period={period}>\n                <PriceView value={tier.price.monthly} period=\"monthly\" active={period === \"monthly\"} currency={currency} />\n                <PriceView value={tier.price.yearly} period=\"yearly\" active={period === \"yearly\"} currency={currency} />\n              </div>\n              <a className=\"hb-ps-cta\" href={tier.cta.href}>\n                {tier.cta.label}\n              </a>\n              <ul className=\"hb-ps-list\">\n                {tier.features.map((feature) => (\n                  <li key={feature}>\n                    <Check />\n                    {feature}\n                  </li>\n                ))}\n              </ul>\n            </li>\n          ))}\n        </ul>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}