'use client'; import { HTMLAttributes, useMemo, useState } from 'react'; import Link from 'next/link'; import { useSearchParams } from 'next/navigation'; import { AnimatePresence, motion } from 'framer-motion'; import { usePlausible } from 'next-plausible'; import { cn } from '@documenso/ui/lib/utils'; import { Button } from '@documenso/ui/primitives/button'; import { ClaimPlanDialog } from './claim-plan-dialog'; export type PricingTableProps = HTMLAttributes; const SELECTED_PLAN_BAR_LAYOUT_ID = 'selected-plan-bar'; export const PricingTable = ({ className, ...props }: PricingTableProps) => { const params = useSearchParams(); const event = usePlausible(); const [period, setPeriod] = useState<'MONTHLY' | 'YEARLY'>(() => params?.get('planId') === process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID ? 'YEARLY' : 'MONTHLY', ); const planId = useMemo(() => { if (period === 'MONTHLY') { return process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID; } return process.env.NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_YEARLY_PRICE_ID; }, [period]); return (
setPeriod('MONTHLY')} > Monthly {period === 'MONTHLY' && ( )} setPeriod('YEARLY')} > Yearly
Save $60
{period === 'YEARLY' && ( )}

Self Hosted

Free

For small teams and individuals who need a simple solution

event('view-github')} >

Host your own instance

Full Control

Customizability

Docker Ready

Community Support

Free, Forever

Early Adopters

{period === 'MONTHLY' && $30} {period === 'YEARLY' && $300}

For fast-growing companies that aim to scale across multiple teams.

{' '} The Early Adopter Deal:

Join the movement

Simple signing solution

Email, Discord and Slack assistance

{' '} Includes all upcoming features

Fixed, straightforward pricing

Enterprise

Pricing on request

For large organizations that need extra flexibility and control.

event('enterprise-contact')} >

Everything in Early Adopters, plus:

Custom Subdomain

Compliance Check

Guaranteed Uptime

Reporting & Analysis

24/7 Support

); };