diff --git a/bun.lockb b/bun.lockb index ccaa4773..2b036433 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index d6f77bbf..4541cab8 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "@edge-runtime/cookies": "^4.1.1", - "@headlessui/react": "^1.7.17", + "@headlessui/react": "^2.2.0", "@hookform/resolvers": "^3.3.4", "@react-email/render": "^1.0.1", "@supabase/ssr": "^0.3.0", diff --git a/src/views/home/components/Pricing.tsx b/src/views/home/components/Pricing.tsx new file mode 100644 index 00000000..ce77bc7a --- /dev/null +++ b/src/views/home/components/Pricing.tsx @@ -0,0 +1,221 @@ +import { useState } from "react"; +import Link from "next/link"; +import { twMerge } from "tailwind-merge"; +import { Radio, RadioGroup } from "@headlessui/react"; +import { HiCheckCircle } from "react-icons/hi2"; + +type Frequency = "monthly" | "annually"; + +const frequencies = [ + { + value: "monthly" as Frequency, + label: "Monthly", + priceSuffix: "per user/month", + }, + { + value: "annually" as Frequency, + label: "Yearly", + priceSuffix: "per user/month", + }, +]; + +const tiers = [ + { + name: "Individuals", + id: "tier-individuals", + href: "signup", + buttonText: "Get Started", + price: { monthly: "Free", annually: "Free" }, + description: + "Everything you need, free forever. Unlimited boards, unlimited lists, unlimited cards. Upgrade any time.", + featureHeader: "Free, forever", + features: [ + "1 user", + "Unlimited boards", + "Unlimited lists", + "Unlimited cards", + "Unlimited comments", + "Unlimited activity log", + ], + showPrice: true, + }, + { + name: "Teams", + id: "tier-teams", + href: "signup", + buttonText: "Get Started", + price: { monthly: "£8", annually: "£6" }, + description: + "Kanban is better with a team. Perfect for small and growing teams looking to collaborate.", + featureHeader: "Everything in the free plan, plus:", + features: [ + "Workspace members", + "Admin roles", + "Priority email support", + "Support the development of the project", + ], + highlighted: true, + showPrice: true, + showPriceSuffix: true, + }, + { + name: "Self Host", + id: "tier-self-host", + href: "https://github.com/kanbn/kan", + buttonText: "View docs", + price: { monthly: "Free", annually: "Free" }, + description: + "Spin up a self hosted version of Kan on your own infrastructure. Ideal for organisations that need complete control over their data.", + featureHeader: "Complete control and ownership:", + features: [ + "Run on your own infrastructure", + "Own your data", + "Custom domain", + ], + mostPopular: false, + showPrice: false, + }, +]; + +const Pricing = () => { + const initialFrequency = frequencies[1]!; + const [frequency, setFrequency] = useState(initialFrequency); + + return ( + <> +
+
+

Pricing

+
+ +

+ Simple pricing to fit your needs +

+

+ Get started for free, with no usage limits. For collaboration, upgrade + to a plan that fits the size of your team. +

+
+
+ setFrequency(value)} + className="grid grid-cols-2 gap-x-1 rounded-full p-1 text-center text-xs/5 font-semibold ring-1 ring-inset ring-light-600 dark:ring-dark-600" + > + {frequencies.map((option) => ( + + {option.label} + + ))} + +
+
+
+ +
+ {tiers.map((tier) => ( +
+
+

+ {tier.name} +

+ {tier.highlighted && frequency?.value === "annually" ? ( +

+ -20% +

+ ) : null} +
+

+ {tier.description} +

+

+ + {tier.price[frequency.value]} + + {tier.showPriceSuffix && ( + + {frequency.priceSuffix} + + )} +

+ + {tier.buttonText} + +

+ {tier.featureHeader} +

+ +
+ ))} +
+ + ); +}; + +export default Pricing; diff --git a/src/views/home/index.tsx b/src/views/home/index.tsx index 3faee317..9a7a12d6 100644 --- a/src/views/home/index.tsx +++ b/src/views/home/index.tsx @@ -5,6 +5,8 @@ import { IoLogoGithub } from "react-icons/io"; import Button from "~/components/Button"; import PatternedBackground from "~/components/PatternedBackground"; + +import Pricing from "./components/Pricing"; import { api } from "~/utils/api"; import { env } from "~/env.mjs"; @@ -125,13 +127,8 @@ export default function HomeView() { -
-
-

- We are currently building the product and will be launching - soon. -

-
+
+