'use client'; import * as FancyButton from '@/components/ui/fancy-button'; import * as Hint from '@/components/ui/hint'; import * as SegmentedControl from '@/components/ui/segmented-control'; import ShineBorder from '@/components/animation/shine-border'; import { cn } from '@/utils/cn'; import NumberFlow, { continuous } from '@number-flow/react'; import { Check, InfoIcon } from 'lucide-react'; import Link from 'next/link'; import { useState } from 'react'; interface PlanProps { title: string; popular: boolean; price: number | { monthly: number; yearly: number }; description: string; buttonText: string; benefitList: string[]; } export enum PlanType { Free = 'Free', Pro = 'Pro', ProPlus = 'Pro+', } const PRICING_PLANS: PlanProps[] = [ { title: PlanType.Free, popular: false, price: 0, description: 'For personal note-taking, writing, and creative work with minimal AI features.', buttonText: 'Get started for free', benefitList: [ 'Unlimited Docs saving', '100 Basic AI models requests per month', '100 AI Credits per month', '1 month expiry - renews monthly', '5MB file upload, 200 MB storage', '2 Knowledge assets', 'Basic AI Writing Tools', '1 user seat', 'Community support', ], }, { title: PlanType.Pro, popular: false, price: { monthly: 19, yearly: 190, }, description: 'Perfect for growing teams that need more power and flexibility.', buttonText: 'Start free trial', benefitList: [ 'Unlimited Basic AI models requests', '2000 AI Credits per month', '1 month expiry - renews monthly', '50MB file upload, 2 GB storage', '10 Knowledge assets', 'Unlock all AI Writing Agents', '2 members', 'Browser extension access (coming soon)', 'Priority support', ], }, { title: PlanType.ProPlus, popular: true, price: { monthly: 39, yearly: 390, }, description: 'For those need much higher AI usage limits, priority support.', buttonText: 'Start free trial', benefitList: [ 'Unlimited Premium AI Models', 'Unlimited AI Chat requests', 'Unlimited files upload, 10 GB storage', 'Unlimited Knowledge assets', 'Unlock all AI Writing Tools', '1 month expiry - renews monthly', '5 members', 'Browser extension access (coming soon)', 'Priority support', ], }, ]; const PRICING_RATE = 0.75; export const AIProductPricingCards = ({ className, showHeader = true, }: { className?: string; showHeader?: boolean; }) => { const [selectedPlan, setSelectedPlan] = useState('Yearly'); return (
{showHeader && ( <>

PRICING

Simple, transparent pricing

No credit card required, cancel anytime

)}
Yearly Monthly
{PRICING_PLANS.map( ({ title, popular, price, description, buttonText, benefitList }) => (
{popular ? ( ) : ( <> )}

{title}

{description}

$
/MONTH
{selectedPlan === 'Yearly' && title !== 'Free' && (
(Save 25%)
)}
{buttonText}
{title !== 'Free' ? `Everything in ${title === 'Premium' ? 'Free' : 'Free'}, plus:` : 'Free plan includes:'}
{benefitList.map((benefit) => (
{benefit}
))}
), )}
Pricing in USD. Local currency available in app.
); }; export default AIProductPricingCards;