Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Redesign the pricing page with landing section primitives (#2997)

Luke Vellaf365544627f2
diff --git a/apps/landing/public/locales/en/pricing.json b/apps/landing/public/locales/en/pricing.json
index aff669934..6e638b0f2 100644
--- a/apps/landing/public/locales/en/pricing.json
+++ b/apps/landing/public/locales/en/pricing.json
@@ -1,33 +1,53 @@
{
- "accessAllFeatures": "Access all features",
"annualBenefit": "{count} months free",
- "billingPeriodMonthly": "Monthly",
- "billingPeriodYearly": "Yearly",
+ "basicPolls": "Basic polls",
+ "basicPollsDescription": "Create simple scheduling polls",
"cancelSubscription": "How do I cancel my subscription?",
"cancelSubscriptionAnswer": "You can cancel your subscription at any time by going to your <a>billing settings</a>. Once you cancel your subscription, you will still have access to your paid plan until the end of your billing period. After that, you will be downgraded to a free plan.",
"canUseFree": "Can I use Rallly for free?",
"canUseFreeAnswer2": "Yes, most of Rallly's features are free and many users will never need to pay for anything. However, there are some features that are only available to paying customers. These features are designed to help you get the most out of Rallly.",
- "earlyAdopterDescription": "As an early adopter, you'll lock in your subscription rate and won't be affected by future price increases.",
+ "compareFeature": "Feature",
+ "comparePlans": "Compare plans",
+ "comparePlansDescription": "See what's included in each plan.",
+ "comparePollRetention": "Poll retention",
+ "comparePollRetention30Days": "30 days",
+ "comparePollRetentionIndefinite": "Indefinite",
+ "compareSchedulingPolls": "Scheduling polls",
+ "compareUnlimitedParticipants": "Unlimited participants",
+ "customBranding": "Custom branding",
+ "customBrandingDescription": "Show your logo and brand colors to your participants",
+ "extendedPollLifetimeDescription": "Keep polls indefinitely",
"faq": "Frequently asked questions",
- "freeForever": "free forever",
- "getEarlyAccess": "Get early access to new features",
+ "featureNameExtendedPollLifetime": "Extended poll lifetime",
+ "featureNameSchedule": "Schedule poll",
+ "getPro": "Get Pro",
"howToUpgrade": "How do I upgrade to a paid plan?",
"howToUpgradeAnswer": "To upgrade, you can go to your <a>billing settings</a> and click on <b>Upgrade</b>.",
- "keepPollsIndefinitely": "Keep polls indefinitely",
- "limitedAccess": "Access to core features",
- "monthlyBillingDescription": "per month",
+ "included": "Included",
+ "notIncluded": "Not included",
+ "payMonthly": "Pay monthly",
+ "payYearly": "Pay yearly",
+ "perSeatMonth": "/seat/mo",
+ "perSeatMonthBilledYearly": "/seat/mo, billed yearly",
+ "planFree": "Free",
"planFreeDescription": "For casual users",
"planProDescription": "For power users and professionals",
- "pollsDeleted": "Polls are automatically deleted once they become inactive",
"pricingDescription": "Get started for free. No login required.",
+ "pricingFaqDescription": "Everything you need to know about our plans and billing.",
+ "pricingFinalCtaDescription": "Create your first poll in under a minute. Upgrade when you need more.",
+ "pricingFinalCtaTitle": "Try Rallly for free",
"pricingSubtitle": "Upgrade to a paid plan to get access to premium features",
"pricingTitle": "Get started for free",
+ "prioritySupport": "Priority support",
+ "recommended": "Recommended",
"removeAttribution": "Remove attribution",
- "upgrade": "Upgrade",
- "upgradeNowSaveLater": "Upgrade now, save later",
+ "removeAttributionBenefitDescription": "Hide \"Powered by Rallly\" from your participants",
+ "schedulePollDescription": "Select a final date for your event.",
+ "teamCollaboration": "Team collaboration",
+ "thirtyDayPollRetention": "30 day poll retention",
+ "thirtyDayPollRetentionDescription": "Polls are kept for 30 days after their final date",
"whenPollInactive": "When does a poll become inactive?",
"whenPollInactiveAnswer": "Polls become inactive when all date options are in the past AND there has been no activity for over 30 days. Activity includes new votes, comments, or changes to the poll. Inactive polls are automatically deleted if you do not have a paid subscription.",
"whyUpgrade": "Why should I upgrade?",
- "whyUpgradeAnswer2": "Upgrading to a paid plan makes sense if you use Rallly often or use it for work. The current subscription rate is a special early adopter rate and will increase in the future. By upgrading now, you will get early access to new, high-quality scheduling tools as they are released and lock in your subscription rate so you won't be affected by future price increases.",
- "yearlyBillingDescription": "per year"
+ "whyUpgradeAnswer2": "Upgrading to a paid plan makes sense if you use Rallly often or use it for work. The current subscription rate is a special early adopter rate and will increase in the future. By upgrading now, you will get early access to new, high-quality scheduling tools as they are released and lock in your subscription rate so you won't be affected by future price increases."
}
diff --git a/apps/landing/src/app/[locale]/(main)/pricing/billing-interval.tsx b/apps/landing/src/app/[locale]/(main)/pricing/billing-interval.tsx
new file mode 100644
index 000000000..a7292e1d2
--- /dev/null
+++ b/apps/landing/src/app/[locale]/(main)/pricing/billing-interval.tsx
@@ -0,0 +1,113 @@
+"use client";
+
+import NumberFlow from "@number-flow/react";
+import { cn } from "@rallly/ui";
+import { Switch } from "@rallly/ui/switch";
+import React from "react";
+
+type BillingInterval = "monthly" | "yearly";
+
+const BillingIntervalContext = React.createContext<{
+ interval: BillingInterval;
+ setInterval: (interval: BillingInterval) => void;
+} | null>(null);
+
+function useBillingInterval() {
+ const context = React.useContext(BillingIntervalContext);
+ if (!context) {
+ throw new Error(
+ "useBillingInterval must be used within BillingIntervalProvider",
+ );
+ }
+ return context;
+}
+
+export function BillingIntervalProvider({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const [interval, setInterval] = React.useState<BillingInterval>("yearly");
+ const value = React.useMemo(() => ({ interval, setInterval }), [interval]);
+ return (
+ <BillingIntervalContext.Provider value={value}>
+ {children}
+ </BillingIntervalContext.Provider>
+ );
+}
+
+export function BillingIntervalSwitch({
+ monthlyLabel,
+ yearlyLabel,
+ badge,
+ switchLabel,
+}: {
+ monthlyLabel: React.ReactNode;
+ yearlyLabel: React.ReactNode;
+ badge?: React.ReactNode;
+ switchLabel: string;
+}) {
+ const { interval, setInterval } = useBillingInterval();
+ const isYearly = interval === "yearly";
+ return (
+ <div className="flex items-center gap-x-3">
+ <span
+ className={cn(
+ "font-medium text-sm",
+ isYearly ? "text-gray-500" : "text-gray-800",
+ )}
+ >
+ {monthlyLabel}
+ </span>
+ <Switch
+ aria-label={switchLabel}
+ checked={isYearly}
+ onCheckedChange={(checked) =>
+ setInterval(checked ? "yearly" : "monthly")
+ }
+ />
+ <span
+ className={cn(
+ "font-medium text-sm",
+ isYearly ? "text-gray-800" : "text-gray-500",
+ )}
+ >
+ {yearlyLabel}
+ </span>
+ {badge}
+ </div>
+ );
+}
+
+export function BillingIntervalPrice({
+ monthly,
+ yearly,
+}: {
+ monthly: number;
+ yearly: number;
+}) {
+ const { interval } = useBillingInterval();
+ return (
+ <NumberFlow
+ value={interval === "yearly" ? yearly : monthly}
+ locales="en-US"
+ format={{
+ style: "currency",
+ currency: "USD",
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ }}
+ />
+ );
+}
+
+export function BillingIntervalValue({
+ monthly,
+ yearly,
+}: {
+ monthly: React.ReactNode;
+ yearly: React.ReactNode;
+}) {
+ const { interval } = useBillingInterval();
+ return interval === "yearly" ? yearly : monthly;
+}
diff --git a/apps/landing/src/app/[locale]/(main)/pricing/compare-table.tsx b/apps/landing/src/app/[locale]/(main)/pricing/compare-table.tsx
new file mode 100644
index 000000000..b31911b5c
--- /dev/null
+++ b/apps/landing/src/app/[locale]/(main)/pricing/compare-table.tsx
@@ -0,0 +1,75 @@
+import { cn } from "@rallly/ui";
+import { CircleCheckIcon, XIcon } from "lucide-react";
+import type * as React from "react";
+
+export function CompareTable({
+ className,
+ ...props
+}: React.ComponentProps<"table">) {
+ return (
+ <div className="overflow-x-auto">
+ <table
+ className={cn("w-full border-collapse text-sm", className)}
+ {...props}
+ />
+ </div>
+ );
+}
+
+export function CompareTableHead({
+ className,
+ ...props
+}: React.ComponentProps<"th">) {
+ return (
+ <th
+ className={cn(
+ "w-1/5 px-4 py-4 text-left font-medium text-gray-800",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function CompareTableFeature({
+ className,
+ ...props
+}: React.ComponentProps<"th">) {
+ return (
+ <th
+ scope="row"
+ className={cn("py-4 pr-4 text-left font-normal text-gray-600", className)}
+ {...props}
+ />
+ );
+}
+
+export function CompareTableCell({
+ className,
+ ...props
+}: React.ComponentProps<"td">) {
+ return (
+ <td
+ className={cn("whitespace-nowrap px-4 py-4 text-gray-800", className)}
+ {...props}
+ />
+ );
+}
+
+export function CompareTableCheck({ label }: { label: string }) {
+ return (
+ <>
+ <CircleCheckIcon className="size-4 text-green-600" aria-hidden="true" />
+ <span className="sr-only">{label}</span>
+ </>
+ );
+}
+
+export function CompareTableDash({ label }: { label: string }) {
+ return (
+ <>
+ <XIcon className="size-4 text-gray-400" aria-hidden="true" />
+ <span className="sr-only">{label}</span>
+ </>
+ );
+}
diff --git a/apps/landing/src/app/[locale]/(main)/pricing/page.tsx b/apps/landing/src/app/[locale]/(main)/pricing/page.tsx
index 674b8cc7f..03d9dc51c 100644
--- a/apps/landing/src/app/[locale]/(main)/pricing/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/pricing/page.tsx
@@ -1,185 +1,747 @@
"use cache";
-import { BirdIcon } from "lucide-react";
+import { PLAN_NAMES, pricingData } from "@rallly/billing";
+import { buttonVariants } from "@rallly/ui";
+import { Badge } from "@rallly/ui/badge";
+import {
+ CalendarCheckIcon,
+ CalendarSearchIcon,
+ ClockIcon,
+ EyeOffIcon,
+ LifeBuoyIcon,
+ PaletteIcon,
+ TimerResetIcon,
+ UserPlusIcon,
+} from "lucide-react";
import { cacheLife } from "next/cache";
import Link from "next/link";
import { Trans } from "react-i18next/TransWithoutContext";
+import { AnimatedStat } from "@/components/home/animated-number";
+import { Cta } from "@/components/home/cta";
+import { Faq, FaqItem } from "@/components/home/faq";
+import { Hero } from "@/components/home/hero";
+import { Stats } from "@/components/home/stats";
+import {
+ Section,
+ SectionContent,
+ SectionDescription,
+ SectionHeading,
+ SectionTitle,
+} from "@/components/section";
import { getTranslation } from "@/i18n/server";
+import { getMonthlyPollCount, getMonthlyVoterCount } from "@/lib/data";
import { linkToApp } from "@/lib/linkToApp";
-import { PriceTables } from "./pricing-table";
+import {
+ BillingIntervalPrice,
+ BillingIntervalProvider,
+ BillingIntervalSwitch,
+ BillingIntervalValue,
+} from "./billing-interval";
+import {
+ CompareTable,
+ CompareTableCell,
+ CompareTableCheck,
+ CompareTableDash,
+ CompareTableFeature,
+ CompareTableHead,
+} from "./compare-table";
+import {
+ PlanBenefit,
+ PlanBenefitName,
+ PlanBenefits,
+ PlanBenefitTooltip,
+ PlanCard,
+ PlanCardDescription,
+ PlanCardHeader,
+ PlanCardName,
+ PlanCardPrice,
+ PlanCardPriceAmount,
+ PlanCardPriceLabel,
+ PlanCards,
+} from "./plan-card";
-const FAQ = async (props: { locale: string }) => {
- const { t } = await getTranslation(props.locale, "pricing");
- return (
- <section>
- <h2 className="font-bold text-2xl">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="faq"
- defaults="Frequently asked questions"
- />
- </h2>
- <h3 className="mt-6 mb-2 font-bold text-lg">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="canUseFree"
- defaults="Can I use Rallly for free?"
- />
- </h3>
- <p className="col-span-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="canUseFreeAnswer2"
- defaults="Yes, most of Rallly's features are free and many users will never need to pay for anything. However, there are some features that are only available to paying customers. These features are designed to help you get the most out of Rallly."
- />
- </p>
- <h3 className="mt-6 mb-2 font-bold text-lg">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="whyUpgrade"
- defaults="Why should I upgrade?"
- />
- </h3>
- <p className="col-span-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="whyUpgradeAnswer2"
- defaults="Upgrading to a paid plan makes sense if you use Rallly often or use it for work. The current subscription rate is a special early adopter rate and will increase in the future. By upgrading now, you will get early access to new, high-quality scheduling tools as they are released and lock in your subscription rate so you won't be affected by future price increases."
- />
- </p>
- <h3 className="mt-6 mb-2 font-bold text-lg">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="whenPollInactive"
- defaults="When does a poll become inactive?"
- />
- </h3>
- <p className="col-span-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="whenPollInactiveAnswer"
- defaults="Polls become inactive when all date options are in the past AND there has been no activity for over 30 days. Activity includes new votes, comments, or changes to the poll. Inactive polls are automatically deleted if you do not have a paid subscription."
- />
- </p>
- <h3 className="mt-6 mb-2 font-bold text-lg">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="howToUpgrade"
- defaults="How do I upgrade to a paid plan?"
- />
- </h3>
- <p className="col-span-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="howToUpgradeAnswer"
- components={{
- a: (
- <Link
- className="text-link"
- href={linkToApp("/settings/billing")}
- />
- ),
- b: <strong />,
- }}
- defaults="To upgrade, you can go to your <a>billing settings</a> and click on <b>Upgrade</b>."
- />
- </p>
-
- <h3 className="mt-6 mb-2 font-bold text-lg">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="cancelSubscription"
- defaults="How do I cancel my subscription?"
- />
- </h3>
- <p className="col-span-2 text-muted-foreground text-sm leading-relaxed">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="cancelSubscriptionAnswer"
- components={{
- a: (
- <Link
- className="text-link"
- href={linkToApp("/settings/billing")}
- />
- ),
- b: <strong />,
- }}
- defaults="You can cancel your subscription at any time by going to your <a>billing settings</a>. Once you cancel your subscription, you will still have access to your paid plan until the end of your billing period. After that, you will be downgraded to a free plan."
- />
- </p>
- </section>
- );
-};
+const faqLinkClassName =
+ "text-gray-800 underline underline-offset-2 hover:text-gray-600";
export default async function Page(props: {
params: Promise<{ locale: string }>;
}) {
- cacheLife("max");
+ cacheLife("days");
const { locale } = await props.params;
- const { t } = await getTranslation(locale, "pricing");
+ const { t } = await getTranslation(locale, ["common", "pricing", "home"]);
+ const [pollCount, voterCount] = await Promise.all([
+ getMonthlyPollCount(),
+ getMonthlyVoterCount(),
+ ]);
+ const freeMonths = Math.round(
+ 12 - pricingData.yearly.amount / pricingData.monthly.amount,
+ );
+ const included = t("included", {
+ ns: "pricing",
+ defaultValue: "Included",
+ });
+ const notIncluded = t("notIncluded", {
+ ns: "pricing",
+ defaultValue: "Not included",
+ });
return (
- <article className="mx-auto max-w-3xl space-y-6">
- <header className="space-y-2 sm:py-6">
- <h1 className="font-bold text-2xl tracking-tight sm:text-4xl">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="pricingTitle"
- defaults="Get started for free"
- />
- </h1>
- <p className="text-lg text-muted-foreground">
+ <div className="divide-y">
+ <Section>
+ <Hero
+ className="text-center"
+ title={t("pricingTitle", {
+ ns: "pricing",
+ defaultValue: "Get started for free",
+ })}
+ description={t("pricingSubtitle", {
+ ns: "pricing",
+ defaultValue:
+ "Upgrade to a paid plan to get access to premium features",
+ })}
+ />
+ <BillingIntervalProvider>
+ <div className="mt-8 flex justify-center sm:mt-12">
+ <BillingIntervalSwitch
+ switchLabel={t("payYearly", {
+ ns: "pricing",
+ defaultValue: "Pay yearly",
+ })}
+ monthlyLabel={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="payMonthly"
+ defaults="Pay monthly"
+ />
+ }
+ yearlyLabel={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="payYearly"
+ defaults="Pay yearly"
+ />
+ }
+ badge={
+ <Badge variant="green">
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="annualBenefit"
+ defaults="{count} months free"
+ values={{ count: freeMonths }}
+ />
+ </Badge>
+ }
+ />
+ </div>
+ <PlanCards className="mx-auto mt-4 w-full max-w-3xl sm:mt-6">
+ <PlanCard className="md:col-span-2">
+ <PlanCardHeader>
+ <PlanCardName>{PLAN_NAMES.HOBBY}</PlanCardName>
+ <PlanCardDescription>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="planFreeDescription"
+ defaults="For casual users"
+ />
+ </PlanCardDescription>
+ </PlanCardHeader>
+ <PlanCardPrice>
+ <PlanCardPriceAmount>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="planFree"
+ defaults="Free"
+ />
+ </PlanCardPriceAmount>
+ </PlanCardPrice>
+ <div>
+ <Link
+ href={linkToApp("/")}
+ className={buttonVariants({
+ className: "w-full",
+ })}
+ >
+ <Trans
+ t={t}
+ ns="common"
+ i18nKey="getStarted"
+ defaults="Get started"
+ />
+ </Link>
+ </div>
+ <PlanBenefits>
+ <PlanBenefit icon={<CalendarSearchIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="basicPollsDescription"
+ defaults="Create simple scheduling polls"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="basicPolls"
+ defaults="Basic polls"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ <PlanBenefit icon={<TimerResetIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="thirtyDayPollRetentionDescription"
+ defaults="Polls are kept for 30 days after their final date"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="thirtyDayPollRetention"
+ defaults="30 day poll retention"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ </PlanBenefits>
+ </PlanCard>
+ <PlanCard className="md:col-span-3">
+ <PlanCardHeader>
+ <div className="flex items-center justify-between gap-x-4">
+ <PlanCardName>{PLAN_NAMES.PRO}</PlanCardName>
+ <Badge variant="secondary">
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="recommended"
+ defaults="Recommended"
+ />
+ </Badge>
+ </div>
+ <PlanCardDescription>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="planProDescription"
+ defaults="For power users and professionals"
+ />
+ </PlanCardDescription>
+ </PlanCardHeader>
+ <PlanCardPrice>
+ <PlanCardPriceAmount>
+ <BillingIntervalPrice
+ monthly={pricingData.monthly.amount / 100}
+ yearly={pricingData.yearly.amount / 100 / 12}
+ />
+ </PlanCardPriceAmount>
+ <PlanCardPriceLabel>
+ <BillingIntervalValue
+ yearly={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="perSeatMonthBilledYearly"
+ defaults="/seat/mo, billed yearly"
+ />
+ }
+ monthly={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="perSeatMonth"
+ defaults="/seat/mo"
+ />
+ }
+ />
+ </PlanCardPriceLabel>
+ </PlanCardPrice>
+ <div>
+ <Link
+ href={linkToApp("/settings/billing")}
+ className={buttonVariants({
+ variant: "primary",
+ className: "w-full",
+ })}
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="getPro"
+ defaults="Get Pro"
+ />
+ </Link>
+ </div>
+ <PlanBenefits className="sm:grid-cols-2 sm:gap-x-6">
+ <PlanBenefit icon={<PaletteIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="customBrandingDescription"
+ defaults="Show your logo and brand colors to your participants"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="customBranding"
+ defaults="Custom branding"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ <PlanBenefit icon={<EyeOffIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="removeAttributionBenefitDescription"
+ defaults='Hide "Powered by Rallly" from your participants'
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="removeAttribution"
+ defaults="Remove attribution"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ <PlanBenefit icon={<CalendarCheckIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="schedulePollDescription"
+ defaults="Select a final date for your event."
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="featureNameSchedule"
+ defaults="Schedule poll"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ <PlanBenefit icon={<ClockIcon />}>
+ <PlanBenefitTooltip
+ content={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="extendedPollLifetimeDescription"
+ defaults="Keep polls indefinitely"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="featureNameExtendedPollLifetime"
+ defaults="Extended poll lifetime"
+ />
+ </PlanBenefitTooltip>
+ </PlanBenefit>
+ <PlanBenefit icon={<UserPlusIcon />}>
+ <PlanBenefitName>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="teamCollaboration"
+ defaults="Team collaboration"
+ />
+ </PlanBenefitName>
+ </PlanBenefit>
+ <PlanBenefit icon={<LifeBuoyIcon />}>
+ <PlanBenefitName>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="prioritySupport"
+ defaults="Priority support"
+ />
+ </PlanBenefitName>
+ </PlanBenefit>
+ </PlanBenefits>
+ </PlanCard>
+ </PlanCards>
+ </BillingIntervalProvider>
+ <Stats className="mt-8 sm:mt-24">
<Trans
t={t}
- ns="pricing"
- i18nKey="pricingSubtitle"
- defaults="Upgrade to a paid plan to get access to premium features"
+ ns="home"
+ i18nKey="statsLast30Days"
+ defaults="<b>{voterCount, plural, one {# person} other {# people}}</b> voted on <b>{pollCount, plural, one {# poll} other {# polls}}</b> in the last 30 days"
+ values={{ voterCount, pollCount }}
+ components={{
+ b: <AnimatedStat locale={locale} />,
+ }}
/>
- </p>
- </header>
- <section>
- <PriceTables />
- </section>
- <section>
- <div className="relative flex flex-col gap-4 overflow-hidden rounded-xl bg-blue-400/10 p-4 pr-36 text-blue-800 ring ring-black/5 ring-inset sm:flex-row sm:gap-6">
- <BirdIcon className="absolute -top-4 right-8 size-24 opacity-20" />
- <div>
- <h3 className="font-medium text-sm">
+ </Stats>
+ </Section>
+ <Section>
+ <SectionHeading>
+ <SectionTitle>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="comparePlans"
+ defaults="Compare plans"
+ />
+ </SectionTitle>
+ <SectionDescription>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="comparePlansDescription"
+ defaults="See what's included in each plan."
+ />
+ </SectionDescription>
+ </SectionHeading>
+ <SectionContent>
+ <CompareTable>
+ <thead>
+ <tr className="border-b">
+ <th className="w-3/5">
+ <span className="sr-only">
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="compareFeature"
+ defaults="Feature"
+ />
+ </span>
+ </th>
+ <CompareTableHead>{PLAN_NAMES.HOBBY}</CompareTableHead>
+ <CompareTableHead>{PLAN_NAMES.PRO}</CompareTableHead>
+ </tr>
+ </thead>
+ <tbody className="divide-y">
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="compareSchedulingPolls"
+ defaults="Scheduling polls"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="compareUnlimitedParticipants"
+ defaults="Unlimited participants"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="comparePollRetention"
+ defaults="Poll retention"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="comparePollRetention30Days"
+ defaults="30 days"
+ />
+ </CompareTableCell>
+ <CompareTableCell>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="comparePollRetentionIndefinite"
+ defaults="Indefinite"
+ />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="featureNameSchedule"
+ defaults="Schedule poll"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableDash label={notIncluded} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="customBranding"
+ defaults="Custom branding"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableDash label={notIncluded} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="removeAttribution"
+ defaults="Remove attribution"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableDash label={notIncluded} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="teamCollaboration"
+ defaults="Team collaboration"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableDash label={notIncluded} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ <tr>
+ <CompareTableFeature>
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="prioritySupport"
+ defaults="Priority support"
+ />
+ </CompareTableFeature>
+ <CompareTableCell>
+ <CompareTableDash label={notIncluded} />
+ </CompareTableCell>
+ <CompareTableCell>
+ <CompareTableCheck label={included} />
+ </CompareTableCell>
+ </tr>
+ </tbody>
+ </CompareTable>
+ </SectionContent>
+ </Section>
+ <div>
+ <Section>
+ <SectionHeading>
+ <SectionTitle>
<Trans
t={t}
ns="pricing"
- i18nKey="upgradeNowSaveLater"
- defaults="Upgrade now, save later"
+ i18nKey="faq"
+ defaults="Frequently asked questions"
/>
- </h3>
- <p className="mt-1 text-sm opacity-75">
+ </SectionTitle>
+ <SectionDescription>
<Trans
t={t}
ns="pricing"
- i18nKey="earlyAdopterDescription"
- defaults="As an early adopter, you'll lock in your subscription rate and won't be affected by future price increases."
+ i18nKey="pricingFaqDescription"
+ defaults="Everything you need to know about our plans and billing."
/>
- </p>
- </div>
- </div>
- </section>
- <hr className="border-transparent" />
- <FAQ locale={locale} />
- </article>
+ </SectionDescription>
+ </SectionHeading>
+ <SectionContent>
+ <Faq>
+ <FaqItem
+ question={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="canUseFree"
+ defaults="Can I use Rallly for free?"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="canUseFreeAnswer2"
+ defaults="Yes, most of Rallly's features are free and many users will never need to pay for anything. However, there are some features that are only available to paying customers. These features are designed to help you get the most out of Rallly."
+ />
+ </FaqItem>
+ <FaqItem
+ question={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="whyUpgrade"
+ defaults="Why should I upgrade?"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="whyUpgradeAnswer2"
+ defaults="Upgrading to a paid plan makes sense if you use Rallly often or use it for work. The current subscription rate is a special early adopter rate and will increase in the future. By upgrading now, you will get early access to new, high-quality scheduling tools as they are released and lock in your subscription rate so you won't be affected by future price increases."
+ />
+ </FaqItem>
+ <FaqItem
+ question={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="whenPollInactive"
+ defaults="When does a poll become inactive?"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="whenPollInactiveAnswer"
+ defaults="Polls become inactive when all date options are in the past AND there has been no activity for over 30 days. Activity includes new votes, comments, or changes to the poll. Inactive polls are automatically deleted if you do not have a paid subscription."
+ />
+ </FaqItem>
+ <FaqItem
+ question={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="howToUpgrade"
+ defaults="How do I upgrade to a paid plan?"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="howToUpgradeAnswer"
+ components={{
+ a: (
+ <Link
+ className={faqLinkClassName}
+ href={linkToApp("/settings/billing")}
+ />
+ ),
+ b: <strong />,
+ }}
+ defaults="To upgrade, you can go to your <a>billing settings</a> and click on <b>Upgrade</b>."
+ />
+ </FaqItem>
+ <FaqItem
+ question={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="cancelSubscription"
+ defaults="How do I cancel my subscription?"
+ />
+ }
+ >
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="cancelSubscriptionAnswer"
+ components={{
+ a: (
+ <Link
+ className={faqLinkClassName}
+ href={linkToApp("/settings/billing")}
+ />
+ ),
+ b: <strong />,
+ }}
+ defaults="You can cancel your subscription at any time by going to your <a>billing settings</a>. Once you cancel your subscription, you will still have access to your paid plan until the end of your billing period. After that, you will be downgraded to a free plan."
+ />
+ </FaqItem>
+ </Faq>
+ </SectionContent>
+ </Section>
+ <Section className="sm:py-24">
+ <Cta
+ title={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="pricingFinalCtaTitle"
+ defaults="Try Rallly for free"
+ />
+ }
+ description={
+ <Trans
+ t={t}
+ ns="pricing"
+ i18nKey="pricingFinalCtaDescription"
+ defaults="Create your first poll in under a minute. Upgrade when you need more."
+ />
+ }
+ buttonLabel={
+ <Trans
+ t={t}
+ ns="home"
+ i18nKey="createAPoll"
+ defaults="Create a poll"
+ />
+ }
+ hint={
+ <Trans
+ t={t}
+ ns="home"
+ i18nKey="hint"
+ defaults="It's free! No login required."
+ />
+ }
+ />
+ </Section>
+ </div>
+ </div>
);
}
diff --git a/apps/landing/src/app/[locale]/(main)/pricing/plan-card.tsx b/apps/landing/src/app/[locale]/(main)/pricing/plan-card.tsx
new file mode 100644
index 000000000..409415cdc
--- /dev/null
+++ b/apps/landing/src/app/[locale]/(main)/pricing/plan-card.tsx
@@ -0,0 +1,138 @@
+import { cn } from "@rallly/ui";
+import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
+import type * as React from "react";
+
+export function PlanCards({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "grid divide-y divide-gray-950/5 overflow-hidden rounded-2xl border bg-white md:grid-cols-5 md:divide-x md:divide-y-0",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function PlanCard({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+ <div className={cn("flex flex-col gap-6 p-6", className)} {...props} />
+ );
+}
+
+export function PlanCardHeader({
+ className,
+ ...props
+}: React.ComponentProps<"header">) {
+ return <header className={cn("space-y-0.5", className)} {...props} />;
+}
+
+export function PlanCardName({
+ className,
+ ...props
+}: React.ComponentProps<"h3">) {
+ return (
+ <h3
+ className={cn("font-medium text-gray-800 text-lg", className)}
+ {...props}
+ />
+ );
+}
+
+export function PlanCardDescription({
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return <p className={cn("text-gray-500 text-sm", className)} {...props} />;
+}
+
+export function PlanCardPrice({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+ <div
+ className={cn(
+ "flex min-h-14 flex-wrap items-center gap-x-1.5",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function PlanCardPriceAmount({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ className={cn(
+ "font-semibold text-4xl text-gray-800 tabular-nums tracking-tight",
+ className,
+ )}
+ {...props}
+ />
+ );
+}
+
+export function PlanCardPriceLabel({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return <span className={cn("text-gray-500 text-sm", className)} {...props} />;
+}
+
+export function PlanBenefits({
+ className,
+ ...props
+}: React.ComponentProps<"ul">) {
+ return <ul className={cn("grid gap-3", className)} {...props} />;
+}
+
+export function PlanBenefit({
+ icon,
+ children,
+}: {
+ icon: React.ReactNode;
+ children: React.ReactNode;
+}) {
+ return (
+ <li className="flex items-center gap-x-3 [&_svg]:size-4 [&_svg]:h-lh [&_svg]:shrink-0 [&_svg]:text-gray-400">
+ {icon}
+ {children}
+ </li>
+ );
+}
+
+export function PlanBenefitName({
+ className,
+ ...props
+}: React.ComponentProps<"span">) {
+ return (
+ <span
+ className={cn("font-medium text-gray-800 text-sm", className)}
+ {...props}
+ />
+ );
+}
+
+export function PlanBenefitTooltip({
+ content,
+ children,
+}: {
+ content: React.ReactNode;
+ children: React.ReactNode;
+}) {
+ return (
+ <Tooltip>
+ <TooltipTrigger className="cursor-help text-left font-medium text-gray-800 text-sm underline decoration-gray-400 decoration-dotted underline-offset-4">
+ {children}
+ </TooltipTrigger>
+ <TooltipContent className="max-w-64">{content}</TooltipContent>
+ </Tooltip>
+ );
+}
diff --git a/apps/landing/src/app/[locale]/(main)/pricing/pricing-table.tsx b/apps/landing/src/app/[locale]/(main)/pricing/pricing-table.tsx
deleted file mode 100644
index ab22966f4..000000000
--- a/apps/landing/src/app/[locale]/(main)/pricing/pricing-table.tsx
+++ /dev/null
@@ -1,203 +0,0 @@
-"use client";
-
-import { PLAN_NAMES, pricingData } from "@rallly/billing";
-import { buttonVariants } from "@rallly/ui";
-import { Badge } from "@rallly/ui/badge";
-import {
- BillingPlan,
- BillingPlanDescription,
- BillingPlanHeader,
- BillingPlanPeriod,
- BillingPlanPerk,
- BillingPlanPerks,
- BillingPlanPrice,
- BillingPlanTitle,
-} from "@rallly/ui/billing-plan";
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@rallly/ui/tabs";
-import Link from "next/link";
-import React from "react";
-import { Trans } from "react-i18next/TransWithoutContext";
-
-import { useTranslation } from "@/i18n/client/use-translation";
-import { linkToApp } from "@/lib/linkToApp";
-
-export function PriceTables() {
- const { t } = useTranslation("pricing");
- const [tab, setTab] = React.useState("yearly");
- return (
- <Tabs value={tab} onValueChange={setTab}>
- <div className="flex">
- <TabsList className="mb-4 sm:mb-6">
- <TabsTrigger value="monthly">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="billingPeriodMonthly"
- defaults="Monthly"
- />
- </TabsTrigger>
- <TabsTrigger value="yearly" className="inline-flex gap-x-2.5">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="billingPeriodYearly"
- defaults="Yearly"
- />
- </TabsTrigger>
- </TabsList>
- </div>
- <div className="mx-auto grid gap-4 sm:gap-6 md:grid-cols-2">
- <BillingPlan>
- <BillingPlanHeader>
- <BillingPlanTitle>{PLAN_NAMES.HOBBY}</BillingPlanTitle>
- <BillingPlanDescription>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="planFreeDescription"
- defaults="For casual users"
- />
- </BillingPlanDescription>
- </BillingPlanHeader>
- <div>
- <BillingPlanPrice>$0</BillingPlanPrice>
- <BillingPlanPeriod>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="freeForever"
- defaults="free forever"
- />
- </BillingPlanPeriod>
- </div>
- <hr />
- <Link
- href={linkToApp("/")}
- className={buttonVariants({ className: "w-full" })}
- >
- <Trans
- t={t}
- ns="common"
- i18nKey="getStarted"
- defaults="Get started"
- />
- </Link>
- <BillingPlanPerks>
- <BillingPlanPerk>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="limitedAccess"
- defaults="Access to core features"
- />
- </BillingPlanPerk>
- <BillingPlanPerk>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="pollsDeleted"
- defaults="Polls are automatically deleted once they become inactive"
- />
- </BillingPlanPerk>
- </BillingPlanPerks>
- </BillingPlan>
- <BillingPlan className="relative">
- <BillingPlanHeader>
- <BillingPlanTitle>{PLAN_NAMES.PRO}</BillingPlanTitle>
- <BillingPlanDescription>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="planProDescription"
- defaults="For power users and professionals"
- />
- </BillingPlanDescription>
- </BillingPlanHeader>
- <TabsContent value="yearly">
- <div className="flex items-center gap-x-2">
- <BillingPlanPrice>
- ${pricingData.yearly.amount / 100}
- </BillingPlanPrice>
- <Badge variant="green" className="inline-flex gap-2">
- <Trans
- t={t}
- ns="pricing"
- i18nKey="annualBenefit"
- defaults="{count} months free"
- values={{
- count: 4,
- }}
- />
- </Badge>
- </div>
- <BillingPlanPeriod>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="yearlyBillingDescription"
- defaults="per year"
- />
- </BillingPlanPeriod>
- </TabsContent>
- <TabsContent value="monthly">
- <BillingPlanPrice>
- ${pricingData.monthly.amount / 100}
- </BillingPlanPrice>
- <BillingPlanPeriod>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="monthlyBillingDescription"
- defaults="per month"
- />
- </BillingPlanPeriod>
- </TabsContent>
- <hr />
- <Link
- href={linkToApp("/settings/billing")}
- className={buttonVariants({
- variant: "primary",
- className: "w-full",
- })}
- >
- <Trans t={t} ns="pricing" i18nKey="upgrade" defaults="Upgrade" />
- </Link>
- <BillingPlanPerks>
- <BillingPlanPerk pro={true}>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="accessAllFeatures"
- defaults="Access all features"
- />
- </BillingPlanPerk>
- <BillingPlanPerk pro={true}>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="keepPollsIndefinitely"
- defaults="Keep polls indefinitely"
- />
- </BillingPlanPerk>
- <BillingPlanPerk pro={true}>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="removeAttribution"
- defaults="Remove attribution"
- />
- </BillingPlanPerk>
- <BillingPlanPerk pro={true}>
- <Trans
- t={t}
- ns="pricing"
- i18nKey="getEarlyAccess"
- defaults="Get early access to new features"
- />
- </BillingPlanPerk>
- </BillingPlanPerks>
- </BillingPlan>
- </div>
- </Tabs>
- );
-}
diff --git a/apps/landing/src/components/home/hero.tsx b/apps/landing/src/components/home/hero.tsx
index 2be11094b..7f902ae18 100644
--- a/apps/landing/src/components/home/hero.tsx
+++ b/apps/landing/src/components/home/hero.tsx
@@ -35,14 +35,16 @@ export function Hero({
description,
announcement,
children,
+ className,
}: {
title: React.ReactNode;
description: React.ReactNode;
announcement?: React.ReactNode;
children?: React.ReactNode;
+ className?: string;
}) {
return (
- <div>
+ <div className={className}>
<h1 className="text-balance font-medium text-3xl text-gray-800 tracking-tight sm:text-5xl">
{title}
</h1>
diff --git a/packages/ui/src/badge.tsx b/packages/ui/src/badge.tsx
index 3167f0a73..d2061ab82 100644
--- a/packages/ui/src/badge.tsx
+++ b/packages/ui/src/badge.tsx
@@ -15,7 +15,7 @@ const badgeVariants = cva(
"bg-rose-600/10 text-rose-600 dark:bg-rose-500/10 dark:text-rose-500",
outline: "text-foreground",
green:
- "bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500",
+ "bg-green-400/10 text-green-600 dark:bg-green-500/10 dark:text-green-500",
secondary: "bg-primary/10 text-primary",
},
size: {