Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

πŸ› fix: refactor whole site and update pricing page

Dillion Vermaa5cb95ae4383
diff --git a/app/(docs)/components/page.tsx b/app/(docs)/components/page.tsx
index f5f52044..5618aa0d 100644
--- a/app/(docs)/components/page.tsx
+++ b/app/(docs)/components/page.tsx
@@ -36,7 +36,7 @@ export default async function ComponentPage() {
<FadeIn key={post._id} delay={index * 0.1}>
<article
key={post._id}
- className="group relative flex grow flex-col w-full h-full overflow-hidden rounded-xl border hover:border-gray-300 dark:border-gray-800 dark:hover:border-gray-700 transition-all duration-300"
+ className="group relative flex grow flex-col w-full h-full overflow-hidden rounded-xl border hover:border-gray-300 dark:border-gray-800 dark:hover:border-gray-700 transition-all duration-300 bg-background"
>
{post.video && (
<div className="overflow-hidden">
diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx
index 84d47ef0..3340ab8d 100644
--- a/app/(docs)/layout.tsx
+++ b/app/(docs)/layout.tsx
@@ -1,6 +1,9 @@
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import { getCurrentUser } from "@/lib/session";
+import { cn } from "@/lib/utils";
+import GridPattern from "@/registry/components/magicui/grid-pattern";
+import LinearGradient from "@/registry/components/magicui/linear-gradient";
interface MarketingLayoutProps {
children: React.ReactNode;
@@ -12,13 +15,34 @@ export default async function MarketingLayout({
const user = await getCurrentUser();
return (
- <div className="flex min-h-screen flex-col">
+ <div className="flex min-h-screen flex-col relative">
<SiteHeader user={user} />
- <main className="flex-1">
- <div className="pointer-events-none h-screen absolute inset-0 dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.5),rgba(255,255,255,0))]" />
- {children}
- </main>
+ <main className="flex-1">{children}</main>
<SiteFooter />
+
+ {/* Top Ellipse Gradient */}
+ <div className="pointer-events-none h-screen absolute inset-0 dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.2),rgba(255,255,255,0))]" />
+
+ {/* Grid Pattern */}
+ <GridPattern
+ width={80}
+ height={80}
+ x={-1}
+ y={-1}
+ className={cn(
+ "absolute w-screen h-screen inset-0 stroke-white/10 fill-white/10",
+ "[mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)] -z-50",
+ "skew-y-12 inset-x-0 -top-[20rem] -z-50"
+ )}
+ />
+
+ {/* Linear Gradient */}
+ <LinearGradient
+ className="w-screen h-screen"
+ from="rgba(120,119,198,0.1)"
+ to="rgba(0,0,0,0.0)"
+ direction="bottom right"
+ />
</div>
);
}
diff --git a/app/(marketing)/buy/page.tsx b/app/(marketing)/buy/page.tsx
deleted file mode 100644
index 096cd25c..00000000
--- a/app/(marketing)/buy/page.tsx
+++ /dev/null
@@ -1,160 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { absoluteUrl, cn, constructMetadata } from "@/lib/utils";
-import DotPattern from "@/registry/components/magicui/dot-pattern";
-import FadeIn from "@/registry/components/magicui/fade-in";
-import GridPattern from "@/registry/components/magicui/grid-pattern";
-import LinearGradient from "@/registry/components/magicui/linear-gradient";
-import {
- MagicCard,
- MagicContainer,
-} from "@/registry/components/magicui/magic-card";
-import Meteors from "@/registry/components/magicui/meteors";
-import { ExternalLinkIcon } from "lucide-react";
-import Link from "next/link";
-
-export const metadata = constructMetadata({
- title: "Lifetime Access to Beautifully Crafted Tailwind CSS Components",
- description:
- "Get lifetime access to beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project. Get lifetime access to all components and templates",
- image: absoluteUrl(`/api/og`),
-});
-
-export default function Buy() {
- const plans = [
- {
- name: "Magic UI",
- desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",
- discountPrice: 49,
- price: 79,
- isMostPop: false,
- features: [
- "100+ components (coming soon)",
- "50+ building blocks (coming soon)",
- "5+ full templates (coming soon)",
- "Lifetime Access",
- "Lifetime Updates",
- ],
- },
- ];
-
- return (
- <section className="py-14">
- <div className="max-w-screen-xl mx-auto px-4 md:px-8">
- <div className="mx-auto max-w-2xl text-center">
- <FadeIn>
- <h4 className="text-xl font-bold tracking-tight text-foreground">
- Magic UI
- </h4>
- </FadeIn>
- <FadeIn delay={0.1}>
- <h2 className="text-5xl font-bold tracking-tight text-foreground sm:text-7xl">
- Lifetime Access
- </h2>
- </FadeIn>
- <FadeIn delay={0.2}>
- <p className="mt-6 text-xl leading-8 text-foreground/60">
- Get <strong>lifetime access</strong> to all components and
- templates available today , plus any new ones we add in the future
- for a simple one-time price.
- </p>
- </FadeIn>
- </div>
- <MagicContainer className="mt-16 justify-center gap-6 flex items-center">
- {plans.map((item, idx) => (
- <FadeIn key={idx} delay={0.3}>
- <MagicCard
- spotlight={false}
- className="flex flex-col gap-8 overflow-hidden p-8 cursor-pointer w-[400px] max-w-max"
- >
- <div className="flex flex-col space-y-4">
- <span className="text-foreground font-medium">
- {item.name}
- </span>
- <div className="flex flex-row gap-2">
- <span className="text-7xl text-foreground font-semibold">
- ${item.discountPrice}
- </span>
- <span className="line-through text-4xl text-gray-700 font-normal">
- ${item.price}
- </span>
- </div>
- {/* <span className="text-xl text-foreground/20 font-semibold">
- one-time payment
- </span> */}
- <p className="text-foreground">{item.desc}</p>
- <Link
- href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
- className={cn(
- buttonVariants({ variant: "default", size: "lg" }),
- "w-full"
- )}
- >
- Get Lifetime Access
- <ExternalLinkIcon className="ml-2 h-4 w-4" />
- </Link>
- </div>
- <ul className="space-y-3">
- <li className="pb-2 text-foreground font-medium">
- <p>Features</p>
- </li>
- {item.features.map((featureItem, idx) => (
- <li
- key={idx}
- className="flex items-center gap-5 text-foreground"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- className="h-5 w-5 text-foreground"
- viewBox="0 0 20 20"
- fill="currentColor"
- >
- <path
- fillRule="evenodd"
- d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
- clipRule="evenodd"
- ></path>
- </svg>
- {featureItem}
- </li>
- ))}
- </ul>
-
- <Meteors />
- <DotPattern
- width={20}
- height={20}
- x={-10}
- y={-10}
- cx={1}
- cy={1}
- cr={1}
- className={cn(
- "absolute w-full h-full inset-0 fill-white/20",
- "[mask-image:linear-gradient(to_top_left,white,transparent,transparent)]"
- )}
- />
- </MagicCard>
- </FadeIn>
- ))}
- </MagicContainer>
- </div>
- <GridPattern
- width={80}
- height={80}
- x={-1}
- y={-1}
- className={cn(
- "absolute w-screen h-screen inset-0 stroke-white/10 fill-white/10",
- "[mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)] -z-50",
- "skew-y-12 inset-x-0 h-[70%] -z-50"
- )}
- />
- <LinearGradient
- className="w-screen h-screen"
- from="rgba(120,119,198,0.3)"
- to="rgba(0,0,0,0.0)"
- direction="bottom right"
- />
- </section>
- );
-}
diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx
index 84d47ef0..3340ab8d 100644
--- a/app/(marketing)/layout.tsx
+++ b/app/(marketing)/layout.tsx
@@ -1,6 +1,9 @@
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import { getCurrentUser } from "@/lib/session";
+import { cn } from "@/lib/utils";
+import GridPattern from "@/registry/components/magicui/grid-pattern";
+import LinearGradient from "@/registry/components/magicui/linear-gradient";
interface MarketingLayoutProps {
children: React.ReactNode;
@@ -12,13 +15,34 @@ export default async function MarketingLayout({
const user = await getCurrentUser();
return (
- <div className="flex min-h-screen flex-col">
+ <div className="flex min-h-screen flex-col relative">
<SiteHeader user={user} />
- <main className="flex-1">
- <div className="pointer-events-none h-screen absolute inset-0 dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.5),rgba(255,255,255,0))]" />
- {children}
- </main>
+ <main className="flex-1">{children}</main>
<SiteFooter />
+
+ {/* Top Ellipse Gradient */}
+ <div className="pointer-events-none h-screen absolute inset-0 dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.2),rgba(255,255,255,0))]" />
+
+ {/* Grid Pattern */}
+ <GridPattern
+ width={80}
+ height={80}
+ x={-1}
+ y={-1}
+ className={cn(
+ "absolute w-screen h-screen inset-0 stroke-white/10 fill-white/10",
+ "[mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)] -z-50",
+ "skew-y-12 inset-x-0 -top-[20rem] -z-50"
+ )}
+ />
+
+ {/* Linear Gradient */}
+ <LinearGradient
+ className="w-screen h-screen"
+ from="rgba(120,119,198,0.1)"
+ to="rgba(0,0,0,0.0)"
+ direction="bottom right"
+ />
</div>
);
}
diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx
index a5eab0b8..af5f69ed 100644
--- a/app/(marketing)/page.tsx
+++ b/app/(marketing)/page.tsx
@@ -130,7 +130,7 @@ export default async function Home() {
</section>
<section className="relative flex flex-col gap-4 pb-8 pt-20 md:pb-12">
- <Marquee pauseOnHover className="[--duration:120s]">
+ <Marquee className="[--duration:120s] max-w-screen" pauseOnHover>
{firstRow?.map((data, idx) => (
<FadeIn delay={0.2 + idx * 0.15}>
<ServerTweetCard
@@ -141,7 +141,11 @@ export default async function Home() {
</FadeIn>
))}
</Marquee>
- <Marquee reverse pauseOnHover className="[--duration:120s]">
+ <Marquee
+ className="[--duration:120s] max-w-screen"
+ reverse
+ pauseOnHover
+ >
{secondRow?.map((data, idx) => (
<FadeIn delay={0.2 + idx * 0.15}>
<ServerTweetCard
@@ -155,6 +159,19 @@ export default async function Home() {
<div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/3 bg-gradient-to-r dark:from-background from-white"></div>
<div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/3 bg-gradient-to-l dark:from-background from-white"></div>
</section>
+ {/* <section
+ id="faq"
+ className="mx-auto max-w-container px-4 sm:px-6 lg:px-8"
+ >
+ <Accordion type="single" collapsible className="flex w-full flex-1">
+ <AccordionItem value="item-1">
+ <AccordionTrigger>Is it accessible?</AccordionTrigger>
+ <AccordionContent>
+ Yes. It adheres to the WAI-ARIA design pattern.
+ </AccordionContent>
+ </AccordionItem>
+ </Accordion>
+ </section> */}
</>
);
}
diff --git a/app/(marketing)/pricing/page.tsx b/app/(marketing)/pricing/page.tsx
new file mode 100644
index 00000000..f58e318c
--- /dev/null
+++ b/app/(marketing)/pricing/page.tsx
@@ -0,0 +1,45 @@
+import { PriceCard } from "@/components/price-card";
+import { plans } from "@/config/pricing";
+import { absoluteUrl, constructMetadata } from "@/lib/utils";
+import FadeIn from "@/registry/components/magicui/fade-in";
+import { MagicContainer } from "@/registry/components/magicui/magic-card";
+
+const metadata = constructMetadata({
+ title: "Lifetime Access to Beautifully Crafted Tailwind CSS Components",
+ description:
+ "Get lifetime access to beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project. Get lifetime access to all components and templates",
+ image: absoluteUrl(`/api/og`),
+});
+
+export default function Buy() {
+ return (
+ <section className="py-14">
+ <div className="max-w-screen-xl mx-auto px-4 md:px-8">
+ <div className="mx-auto max-w-2xl text-center">
+ <FadeIn>
+ <h4 className="text-xl font-bold tracking-tight text-foreground">
+ Magic UI
+ </h4>
+ </FadeIn>
+ <FadeIn delay={0.1}>
+ <h2 className="text-5xl font-bold tracking-tight text-foreground sm:text-7xl">
+ Lifetime Access
+ </h2>
+ </FadeIn>
+ <FadeIn delay={0.2}>
+ <p className="mt-6 text-xl leading-8 text-foreground/60">
+ Get <strong>lifetime access</strong> to all components and
+ templates available today , plus any new ones we add in the future
+ for a simple one-time price.
+ </p>
+ </FadeIn>
+ </div>
+ <MagicContainer className="mt-16 w-[400px] mx-auto">
+ {plans.map((item, idx) => (
+ <PriceCard key={idx} item={item} />
+ ))}
+ </MagicContainer>
+ </div>
+ </section>
+ );
+}
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 70527819..f5898d5b 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -12,6 +12,10 @@ export default function sitemap(): MetadataRoute.Sitemap {
url: `${protocol}://${domain}`,
lastModified: new Date(),
},
+ {
+ url: `${protocol}://${domain}/pricing`,
+ lastModified: new Date(),
+ },
...allPages.map((post) => ({
url: `${protocol}://${domain}/${post.slugAsParams}`,
lastModified: new Date(),
diff --git a/components/component-source.tsx b/components/component-source.tsx
index a5a8da2c..0b77a48a 100644
--- a/components/component-source.tsx
+++ b/components/component-source.tsx
@@ -1,5 +1,3 @@
-"use client";
-
import { CodeBlockWrapper } from "@/components/code-block-wrapper";
import PreOrder from "@/components/preorder";
import { cn, fetcher } from "@/lib/utils";
diff --git a/components/empty-placeholder.tsx b/components/empty-placeholder.tsx
index 2ef93485..1f444bd9 100644
--- a/components/empty-placeholder.tsx
+++ b/components/empty-placeholder.tsx
@@ -13,12 +13,12 @@ export function EmptyPlaceholder({
return (
<div
className={cn(
- "flex min-h-[400px] flex-col items-center justify-center rounded-md border border-dashed p-8 text-center animate-in fade-in-50",
+ "flex flex-col items-center justify-center rounded-md border border-dashed p-8 text-center animate-in fade-in-50",
className
)}
{...props}
>
- <div className="mx-auto flex max-w-[420px] flex-col items-center justify-center text-center">
+ <div className="mx-auto flex flex-col items-center justify-center text-center">
{children}
</div>
</div>
diff --git a/components/preorder.tsx b/components/preorder.tsx
index 2a0c360f..3bf724fb 100644
--- a/components/preorder.tsx
+++ b/components/preorder.tsx
@@ -1,12 +1,10 @@
-"use client";
-
-import { EmptyPlaceholder } from "@/components/empty-placeholder";
-import { buttonVariants } from "@/components/ui/button";
+import { PriceCard } from "@/components/price-card";
+import { plans } from "@/config/pricing";
+import { MagicContainer } from "@/registry/components/magicui/magic-card";
import { useSession } from "next-auth/react";
-import Link from "next/link";
export default function PreOrder() {
- const { data: session } = useSession();
+ const { data: session, status } = useSession();
const user = session?.user;
const url = new URL(
@@ -15,28 +13,15 @@ export default function PreOrder() {
: "https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
);
- if (user && user.email) {
+ if (status === "authenticated" && user && user.email) {
url.searchParams.append("prefilled_email", user.email);
}
return (
- <EmptyPlaceholder className="w-full">
- <EmptyPlaceholder.Icon name="logo" />
- <EmptyPlaceholder.Title className="lg:text-2xl">
- Pre-order to get access Magic UI πŸͺ„
- </EmptyPlaceholder.Title>
- <EmptyPlaceholder.Description>
- You get the complete source code of all components and templates so you
- can use them in your projects πŸŽ‰
- </EmptyPlaceholder.Description>
- <Link
- href={url.toString()}
- target="_blank"
- rel="noreferrer"
- className={buttonVariants({ variant: "default", size: "lg" })}
- >
- Pre-order
- </Link>
- </EmptyPlaceholder>
+ <MagicContainer className="not-prose w-full">
+ {plans.map((item, idx) => (
+ <PriceCard key={idx} item={item} />
+ ))}
+ </MagicContainer>
);
}
diff --git a/components/price-card.tsx b/components/price-card.tsx
new file mode 100644
index 00000000..fa9f5837
--- /dev/null
+++ b/components/price-card.tsx
@@ -0,0 +1,90 @@
+import { buttonVariants } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+import DotPattern from "@/registry/components/magicui/dot-pattern";
+import FadeIn from "@/registry/components/magicui/fade-in";
+import { MagicCard } from "@/registry/components/magicui/magic-card";
+import Meteors from "@/registry/components/magicui/meteors";
+import { ExternalLinkIcon, Link } from "lucide-react";
+
+export const PriceCard = ({
+ item,
+ className,
+}: {
+ item: any;
+ className?: string;
+}) => {
+ return (
+ <FadeIn delay={0.3} className={className}>
+ <MagicCard
+ spotlight={false}
+ className="relative flex flex-col gap-8 overflow-hidden p-8"
+ >
+ <div className="flex flex-col space-y-4">
+ <span className="text-foreground font-medium">{item.name}</span>
+ <div className="flex flex-row gap-2">
+ <span className="text-7xl text-foreground font-semibold">
+ ${item.discountPrice}
+ </span>
+ <span className="line-through text-4xl text-gray-700 font-normal">
+ ${item.price}
+ </span>
+ </div>
+ <span className="text-xl text-foreground/20 font-semibold">
+ one-time payment
+ </span>
+ <p className="text-foreground">{item.desc}</p>
+ <Link
+ href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
+ className={cn(
+ buttonVariants({ variant: "default", size: "lg" }),
+ "w-full"
+ )}
+ >
+ Get Lifetime Access
+ <ExternalLinkIcon className="ml-2 h-4 w-4" />
+ </Link>
+ </div>
+ <ul className="space-y-3">
+ <li className="pb-2 text-foreground font-medium">
+ <p>Features</p>
+ </li>
+ {item.features.map((featureItem: any, idx: any) => (
+ <li
+ key={idx}
+ className="flex items-center gap-5 text-foreground text-sm"
+ >
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ className="h-5 w-5 text-foreground"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ >
+ <path
+ fillRule="evenodd"
+ d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
+ clipRule="evenodd"
+ ></path>
+ </svg>
+ {featureItem}
+ </li>
+ ))}
+ </ul>
+
+ <Meteors />
+ <DotPattern
+ width={20}
+ height={20}
+ x={-10}
+ y={-10}
+ cx={1}
+ cy={1}
+ cr={1}
+ className={cn(
+ "absolute w-full h-full inset-0 fill-white/20",
+ "[mask-image:linear-gradient(to_top_left,white,transparent,transparent)]"
+ )}
+ />
+ </MagicCard>
+ </FadeIn>
+ );
+};
diff --git a/config/docs.ts b/config/docs.ts
index 4f39b285..1badc957 100644
--- a/config/docs.ts
+++ b/config/docs.ts
@@ -14,8 +14,8 @@ export const docsConfig: DocsConfig = {
href: "/components",
},
{
- title: "Buy",
- href: "/buy",
+ title: "Pricing",
+ href: "/pricing",
},
],
sidebarNav: [
diff --git a/config/pricing.ts b/config/pricing.ts
new file mode 100644
index 00000000..84e2052f
--- /dev/null
+++ b/config/pricing.ts
@@ -0,0 +1,16 @@
+export const plans = [
+ {
+ name: "Magic UI",
+ desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",
+ discountPrice: 49,
+ price: 79,
+ isMostPop: false,
+ features: [
+ "100+ components (coming soon)",
+ "50+ building blocks (coming soon)",
+ "5+ full templates (coming soon)",
+ "Lifetime Access",
+ "Lifetime Updates",
+ ],
+ },
+];
diff --git a/registry/components/magicui/magic-card.tsx b/registry/components/magicui/magic-card.tsx
index a7132ecd..c64ab46f 100644
--- a/registry/components/magicui/magic-card.tsx
+++ b/registry/components/magicui/magic-card.tsx
@@ -229,7 +229,7 @@ const MagicCard = ({
}
>
{/* Border */}
- <div className="pointer-events-none absolute w-full h-full rounded-lg top-0 left-0 duration-500 transition-opacity bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),#ffaa40_0,#9c40ff_50%,transparent_100%)] -z-30 bg-gray-800" />
+ <div className="pointer-events-none absolute w-full h-full rounded-lg top-0 left-0 duration-500 transition-opacity bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),#ffaa40_0,#9c40ff_50%,transparent_100%)] -z-30 dark:bg-gray-700 bg-gray-300" />
{children}
diff --git a/registry/components/magicui/marquee.tsx b/registry/components/magicui/marquee.tsx
index 5a9d962d..02394307 100644
--- a/registry/components/magicui/marquee.tsx
+++ b/registry/components/magicui/marquee.tsx
@@ -20,7 +20,7 @@ const Marquee = ({
<div
{...props}
className={cn(
- "relative flex w-full overflow-hidden [--gap:1rem] [--duration:20s]",
+ "flex w-full overflow-hidden [--gap:1rem] [--duration:20s]",
className
)}
>