'use client' import { useState } from 'react' import { Button, CheckCircleIcon } from '@ciphera-net/ui' // 1. Define Plans with IDs and Site Limits const PLANS = [ { id: 'solo', name: 'Solo', description: 'For personal sites and freelancers', features: [ '1 site', '1 year data retention', 'Email reports', '100% Data ownership' ] }, { id: 'team', name: 'Team', description: 'For startups and growing agencies', features: [ 'Up to 5 sites', '3 years data retention', 'Team dashboard', 'Shared links' ] }, { id: 'business', name: 'Business', description: 'For large organizations', features: [ 'Up to 10 sites', 'Unlimited data retention', 'Priority support', 'Custom events' ] } ] // 2. Define Explicit Pricing per Tier (approx 20% cheaper than Plausible) // Includes intermediate steps: 50k, 250k, 2.5M const TRAFFIC_TIERS = [ { label: '10k', value: 10000, prices: { solo: 7, team: 12, business: 19 } }, { label: '50k', value: 50000, prices: { solo: 11, team: 19, business: 29 } }, { label: '100k', value: 100000, prices: { solo: 15, team: 25, business: 39 } }, { label: '250k', value: 250000, prices: { solo: 25, team: 39, business: 59 } }, { label: '500k', value: 500000, prices: { solo: 39, team: 59, business: 89 } }, { label: '1M', value: 1000000, prices: { solo: 55, team: 79, business: 119 } }, { label: '2.5M', value: 2500000, prices: { solo: 79, team: 119, business: 169 } }, { label: '5M', value: 5000000, prices: { solo: 109, team: 159, business: 219 } }, { label: '10M+', value: 10000000, prices: { solo: null, team: null, business: null } }, ] export default function PricingSection() { const [isYearly, setIsYearly] = useState(false) const [sliderIndex, setSliderIndex] = useState(2) // Default to 100k (index 2) const currentTraffic = TRAFFIC_TIERS[sliderIndex] const calculatePrice = (planId: string) => { // @ts-ignore const basePrice = currentTraffic.prices[planId] // Handle "Custom" or missing prices if (basePrice === null || basePrice === undefined) return 'Custom' let price = basePrice if (isYearly) { price = price * 0.8 // 20% discount } return '€' + Math.round(price) } return (

Traffic based plans that match your growth

Sign up for 30-day free trial. No credit card required.

{/* Controls Container */}
{/* Slider */}
10k Up to {currentTraffic.label} monthly pageviews 10M+
setSliderIndex(parseInt(e.target.value))} className="w-full h-2 bg-neutral-200 rounded-lg appearance-none cursor-pointer dark:bg-neutral-700 accent-brand-orange" />
{/* Toggle */}
Monthly Yearly 2 months free
{/* Pricing Cards Grid */}
{PLANS.map((plan) => (

{plan.name}

{calculatePrice(plan.id)} {calculatePrice(plan.id) !== 'Custom' && ( /{isYearly ? 'mo' : 'month'} )}
{isYearly && calculatePrice(plan.id) !== 'Custom' && (

Billed yearly

)}
    {plan.features.map((feature) => (
  • {feature}
  • ))}
))} {/* Enterprise Card (Dark Style) */}

Enterprise

Custom

For high volume sites

    {[ 'Everything in Business', '10+ sites', 'Unlimited team members', 'SLA & Priority Support', 'Managed Proxy', 'Raw data export' ].map((feature) => (
  • {feature}
  • ))}
) }