Skip to content

Open source CapCut alternative.

TypeScript

feat(site): fold Max into a line on wide pricing

David Lec55739af3f37
diff --git a/site/src/app/[locale]/cut/_components/landing/CutPricing.tsx b/site/src/app/[locale]/cut/_components/landing/CutPricing.tsx
index 75ac0615..66a68f44 100644
--- a/site/src/app/[locale]/cut/_components/landing/CutPricing.tsx
+++ b/site/src/app/[locale]/cut/_components/landing/CutPricing.tsx
@@ -4,13 +4,25 @@ import { useTranslations } from "next-intl";
import { Headline } from "@/app/_components/landing/LandingPrimitives";
import { PricingPlanCard } from "@/app/_components/landing/PricingPlanCard";
+import { useAppEntryHref } from "@/app/_components/landing/useAppEntryHref";
import { useMediaQuery } from "@/app/_components/landing/useMediaQuery";
-import { useCutPricingPlans } from "@/app/[locale]/cut/_components/landing/cutPricingPlans";
+import {
+ NOTE_PLAN,
+ useCutPlan,
+ useCutPricingPlans,
+} from "@/app/[locale]/cut/_components/landing/cutPricingPlans";
export function CutPricing() {
const isDesktop = useMediaQuery("(min-width: 768px)");
+ const appHref = useAppEntryHref();
const t = useTranslations("landing.pricing");
- const plans = useCutPricingPlans();
+
+ // Every plan CTA enters the app, so gate them the same way as the hero: a
+ // signed-out click lands on sign-in first, then returns to the app target.
+ const plans = useCutPricingPlans().map((plan) => ({
+ ...plan,
+ action: { ...plan.action, href: appHref(plan.action.href) },
+ }));
return (
<section
@@ -39,9 +51,11 @@ export function CutPricing() {
gap: 24,
}}
>
- {plans.map((plan) => (
- <PricingPlanCard key={plan.name} plan={plan} />
- ))}
+ {plans
+ .filter((plan) => plan.id !== NOTE_PLAN)
+ .map((plan) => (
+ <PricingPlanCard key={plan.id} plan={plan} />
+ ))}
</div>
) : (
// Phones scroll the cards sideways. The row bleeds past the section
@@ -61,12 +75,25 @@ export function CutPricing() {
}}
>
{plans.map((plan) => (
- <div key={plan.name} style={{ flex: "0 0 80%", scrollSnapAlign: "start" }}>
+ <div key={plan.id} style={{ flex: "0 0 80%", scrollSnapAlign: "start" }}>
<PricingPlanCard plan={plan} />
</div>
))}
</div>
)}
+ {isDesktop ? <NotePlan /> : null}
</section>
);
}
+
+// The plan without a card on a wide window, as one line under the row.
+function NotePlan() {
+ const t = useTranslations("landing.pricing");
+ const copy = useCutPlan(NOTE_PLAN);
+
+ return (
+ <p className="mt-6 text-[17px] font-semibold text-foreground md:mt-10">
+ {t("notePlan", { plan: copy.name, price: copy.price })}
+ </p>
+ );
+}
diff --git a/site/src/app/[locale]/cut/_components/landing/cutPricingPlans.ts b/site/src/app/[locale]/cut/_components/landing/cutPricingPlans.ts
index eb7ebb8d..4a0d8a43 100644
--- a/site/src/app/[locale]/cut/_components/landing/cutPricingPlans.ts
+++ b/site/src/app/[locale]/cut/_components/landing/cutPricingPlans.ts
@@ -85,12 +85,22 @@ const PLAN_COLORS: Record<PaidPlan, { color: CardColor; tapeColor: CardColor }>
max: { color: "cream", tapeColor: "pink" },
};
+// The plan a wide landing names in a line under the cards, without a card
+// of its own, so the row stays short. Phones scroll through every card.
+export const NOTE_PLAN: PaidPlan = "max";
+
export function useCutPricingPlans(): PricingPlan[] {
const t = useTranslations("landing.plans");
const locale = useLocale();
const plans = useCutPlans();
return [
{
+ id: "free",
+ action: {
+ href: "/app",
+ kind: "link",
+ label: t("free.cta"),
+ },
body: t("free.body"),
color: "cream",
features: [
@@ -104,6 +114,12 @@ export function useCutPricingPlans(): PricingPlan[] {
tapeColor: "coral",
},
...plans.map((copy, i): PricingPlan => ({
+ id: copy.plan,
+ action: {
+ href: "/app/settings",
+ kind: "link",
+ label: t("paid.cta", { plan: copy.name }),
+ },
body: copy.body,
...PLAN_COLORS[copy.plan],
// The first plan names what it adds to Free after its credits, the way
diff --git a/site/src/app/_components/landing/PricingPlanCard.tsx b/site/src/app/_components/landing/PricingPlanCard.tsx
index fa3c9807..90739495 100644
--- a/site/src/app/_components/landing/PricingPlanCard.tsx
+++ b/site/src/app/_components/landing/PricingPlanCard.tsx
@@ -2,7 +2,10 @@
import { Check } from "lucide-react";
-import { TapedCard } from "@/app/_components/landing/LandingPrimitives";
+import {
+ PillButton,
+ TapedCard,
+} from "@/app/_components/landing/LandingPrimitives";
import type { PricingPlan } from "@/app/_components/landing/pricingPlans";
import { useMediaQuery } from "@/app/_components/landing/useMediaQuery";
@@ -12,6 +15,13 @@ type Props = {
export function PricingPlanCard({ plan }: Props) {
const isDesktop = useMediaQuery("(min-width: 768px)");
+ const action = plan.action;
+
+ const button = (
+ <PillButton href={action.href} variant="dark" width="full">
+ {action.label}
+ </PillButton>
+ );
return (
<TapedCard
@@ -55,6 +65,7 @@ export function PricingPlanCard({ plan }: Props) {
style={{
display: "grid",
gap: 10,
+ marginBottom: 28,
}}
>
{plan.features.map((feature) => (
@@ -87,6 +98,7 @@ export function PricingPlanCard({ plan }: Props) {
</div>
))}
</div>
+ <div style={{ marginTop: "auto" }}>{button}</div>
</div>
</TapedCard>
);
diff --git a/site/src/app/_components/landing/pricingPlans.ts b/site/src/app/_components/landing/pricingPlans.ts
index 1814ddbf..d509be56 100644
--- a/site/src/app/_components/landing/pricingPlans.ts
+++ b/site/src/app/_components/landing/pricingPlans.ts
@@ -2,8 +2,16 @@ import type { CardColor } from "@/app/_components/landing/theme";
// The shape pricing cards render from. Donkey Use no longer sells through the
// site, so plans exist only where a product still lists them (Cut's landing —
-// see cutPricingPlans.ts).
+// see cutPricingPlans.ts); every action is a plain link.
+export type PricingPlanAction = {
+ href: string;
+ kind: "contact" | "link";
+ label: string;
+};
+
export type PricingPlan = {
+ id: string;
+ action: PricingPlanAction;
body: string;
color: CardColor;
features: string[];
diff --git a/site/src/i18n/messages/.source-lock.json b/site/src/i18n/messages/.source-lock.json
index 888185ef..40a70a00 100644
--- a/site/src/i18n/messages/.source-lock.json
+++ b/site/src/i18n/messages/.source-lock.json
@@ -2093,12 +2093,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -5119,12 +5122,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -8145,12 +8151,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -11171,12 +11180,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -14197,12 +14209,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -17223,12 +17238,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
@@ -20249,12 +20267,15 @@
"worksWith.body": "59ab665df233",
"pricing.title": "5cb23e5648fb",
"pricing.body": "e0d25a257d31",
+ "pricing.notePlan": "c51684ed2131",
"plans.free.name": "75f527181b57",
"plans.free.body": "e2f7606c3f63",
+ "plans.free.cta": "bc37399d5d6a",
"plans.free.editor": "3c551eeb20e4",
"plans.free.storage": "f335e7a25f8f",
"plans.free.tools": "21e7962cf954",
"plans.free.subscriptions": "5d318bd27003",
+ "plans.paid.cta": "36572be917c8",
"plans.paid.everythingInFree": "b6017dd40013",
"local.title": "3345a1fc0d10",
"local.body": "02b546b1aaf5",
diff --git a/site/src/i18n/messages/de/landing.json b/site/src/i18n/messages/de/landing.json
index bc53fd31..f57fa54d 100644
--- a/site/src/i18n/messages/de/landing.json
+++ b/site/src/i18n/messages/de/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "Einfache <italic>Preise</italic>",
- "body": "Der Editor ist kostenlos. Zahle nur für KI-generierte Medien."
+ "body": "Der Editor ist kostenlos. Zahle nur für KI-generierte Medien.",
+ "notePlan": "{plan}-Plan: {price}"
},
"plans": {
"free": {
"name": "Free",
"body": "Der gesamte Editor, in der Cloud oder auf deinem Mac.",
+ "cta": "Neues Projekt starten",
"editor": "Voller Zugriff auf den Video-Editor",
"storage": "{mb, number} MB Cloud-Speicher",
"tools": "Import, Export und lokale Transkription",
"subscriptions": "Verbinde dein Claude- oder Codex-Abo"
},
"paid": {
+ "cta": "{plan} holen",
"everythingInFree": "Alles aus Free"
}
},
diff --git a/site/src/i18n/messages/en/landing.json b/site/src/i18n/messages/en/landing.json
index 20b22e83..c2016eae 100644
--- a/site/src/i18n/messages/en/landing.json
+++ b/site/src/i18n/messages/en/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "Simple <italic>pricing</italic>",
- "body": "The editor is free. Pay only for AI generated media."
+ "body": "The editor is free. Pay only for AI generated media.",
+ "notePlan": "{plan} plan: {price}"
},
"plans": {
"free": {
"name": "Free",
"body": "The whole editor, in the cloud or on your own Mac.",
+ "cta": "Start a new project",
"editor": "Full access to the video editor",
"storage": "{mb, number} MB of cloud storage",
"tools": "Import, export, and local transcription",
"subscriptions": "Connect your Claude or Codex subscription"
},
"paid": {
+ "cta": "Get {plan}",
"everythingInFree": "Everything in Free"
}
},
diff --git a/site/src/i18n/messages/es/landing.json b/site/src/i18n/messages/es/landing.json
index d35aac4d..c041077a 100644
--- a/site/src/i18n/messages/es/landing.json
+++ b/site/src/i18n/messages/es/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "Precios <italic>simples</italic>",
- "body": "El editor es gratis. Paga solo por la multimedia generada con IA."
+ "body": "El editor es gratis. Paga solo por la multimedia generada con IA.",
+ "notePlan": "Plan {plan}: {price}"
},
"plans": {
"free": {
"name": "Gratis",
"body": "Todo el editor, en la nube o en tu propia Mac.",
+ "cta": "Comienza un nuevo proyecto",
"editor": "Acceso total al editor de video",
"storage": "{mb, number} MB de almacenamiento en la nube",
"tools": "Importación, exportación y transcripción local",
"subscriptions": "Conecta tu suscripción a Claude o Codex"
},
"paid": {
+ "cta": "Obtén {plan}",
"everythingInFree": "Todo lo incluido en Free"
}
},
diff --git a/site/src/i18n/messages/fr/landing.json b/site/src/i18n/messages/fr/landing.json
index 6b3ad3fd..cb583a3b 100644
--- a/site/src/i18n/messages/fr/landing.json
+++ b/site/src/i18n/messages/fr/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "Tarification <italic>simple</italic>",
- "body": "L'éditeur est gratuit. Ne payez que pour les médias générés par IA."
+ "body": "L'éditeur est gratuit. Ne payez que pour les médias générés par IA.",
+ "notePlan": "Forfait {plan} : {price}"
},
"plans": {
"free": {
"name": "Gratuit",
"body": "L'ensemble de l'éditeur, dans le cloud ou sur votre Mac.",
+ "cta": "Commencer un nouveau projet",
"editor": "Accès complet à l'éditeur vidéo",
"storage": "{mb, number} MB de stockage cloud",
"tools": "Import, export et transcription locale",
"subscriptions": "Connectez votre abonnement Claude ou Codex"
},
"paid": {
+ "cta": "Obtenir {plan}",
"everythingInFree": "Tout ce qui est inclus dans Gratuit"
}
},
diff --git a/site/src/i18n/messages/ja/landing.json b/site/src/i18n/messages/ja/landing.json
index b5988191..6535ccd4 100644
--- a/site/src/i18n/messages/ja/landing.json
+++ b/site/src/i18n/messages/ja/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "シンプルな<italic>料金プラン</italic>",
- "body": "エディターは無料です。料金が発生するのはAI生成メディアの利用時のみです。"
+ "body": "エディターは無料です。料金が発生するのはAI生成メディアの利用時のみです。",
+ "notePlan": "{plan}プラン: {price}"
},
"plans": {
"free": {
"name": "Free",
"body": "クラウドでも、お使いのMacでも、すべてのエディター機能を利用可能。",
+ "cta": "新規プロジェクトを開始",
"editor": "動画エディターへのフルアクセス",
"storage": "{mb, number} MBのクラウドストレージ",
"tools": "インポート、書き出し、ローカル文字起こし",
"subscriptions": "ClaudeやCodexのサブスクリプションと連携"
},
"paid": {
+ "cta": "{plan}を入手",
"everythingInFree": "Freeプランの全機能"
}
},
diff --git a/site/src/i18n/messages/ko/landing.json b/site/src/i18n/messages/ko/landing.json
index 73221292..33e4c806 100644
--- a/site/src/i18n/messages/ko/landing.json
+++ b/site/src/i18n/messages/ko/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "단순한 <italic>요금제</italic>",
- "body": "편집기는 무료예요. AI로 생성하는 미디어에 대해서만 결제하세요."
+ "body": "편집기는 무료예요. AI로 생성하는 미디어에 대해서만 결제하세요.",
+ "notePlan": "{plan} 플랜: {price}"
},
"plans": {
"free": {
"name": "Free",
"body": "클라우드나 Mac에서 편집기 전체 기능을 무료로 이용하세요.",
+ "cta": "새 프로젝트 시작하기",
"editor": "동영상 편집기 전체 기능 이용",
"storage": "클라우드 스토리지 {mb, number} MB",
"tools": "가져오기, 내보내기 및 온디바이스 텍스트 변환",
"subscriptions": "보유한 Claude 또는 Codex 구독 연동"
},
"paid": {
+ "cta": "{plan} 시작하기",
"everythingInFree": "Free 플랜의 모든 기능"
}
},
diff --git a/site/src/i18n/messages/pt-BR/landing.json b/site/src/i18n/messages/pt-BR/landing.json
index 831b6abb..72cc71a4 100644
--- a/site/src/i18n/messages/pt-BR/landing.json
+++ b/site/src/i18n/messages/pt-BR/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "Preços <italic>simples</italic>",
- "body": "O editor é gratuito. Pague apenas pelas mídias geradas por IA."
+ "body": "O editor é gratuito. Pague apenas pelas mídias geradas por IA.",
+ "notePlan": "Plano {plan}: {price}"
},
"plans": {
"free": {
"name": "Gratuito",
"body": "O editor completo, na nuvem ou no seu próprio Mac.",
+ "cta": "Começar um novo projeto",
"editor": "Acesso completo ao editor de vídeo",
"storage": "{mb, number} MB de armazenamento na nuvem",
"tools": "Importação, exportação e transcrição local",
"subscriptions": "Conecte sua assinatura do Claude ou Codex"
},
"paid": {
+ "cta": "Obter {plan}",
"everythingInFree": "Tudo do plano Gratuito"
}
},
diff --git a/site/src/i18n/messages/zh-CN/landing.json b/site/src/i18n/messages/zh-CN/landing.json
index f9a96af9..3fc0e295 100644
--- a/site/src/i18n/messages/zh-CN/landing.json
+++ b/site/src/i18n/messages/zh-CN/landing.json
@@ -20,18 +20,21 @@
},
"pricing": {
"title": "价格<italic>简单透明</italic>",
- "body": "编辑器完全免费,仅对 AI 生成的媒体内容按需付费。"
+ "body": "编辑器完全免费,仅对 AI 生成的媒体内容按需付费。",
+ "notePlan": "{plan} 方案:{price}"
},
"plans": {
"free": {
"name": "免费版",
"body": "完整的编辑器功能,支持云端或在你的 Mac 本地运行。",
+ "cta": "新建项目",
"editor": "完整使用视频编辑器",
"storage": "{mb, number} MB 云存储空间",
"tools": "导入、导出及本地转录",
"subscriptions": "关联你的 Claude 或 Codex 订阅"
},
"paid": {
+ "cta": "获取 {plan}",
"everythingInFree": "包含免费版的所有功能"
}
},