UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: add update landing page and few examples
Dillion Verma6fad9e685cb0
diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsxindex f55bffa6..cb8d7144 100644--- a/app/(marketing)/layout.tsx+++ b/app/(marketing)/layout.tsx@@ -1,8 +1,6 @@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";interface MarketingLayoutProps {children: React.ReactNode;@@ -21,10 +19,10 @@ export default async function MarketingLayout({<SiteFooter />{/* Top Ellipse Gradient */}- {/* <div className="pointer-events-none absolute inset-0 h-screen bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.2),rgba(255,255,255,0))] dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.2),rgba(255,255,255,0))]" /> */}+ <div className="pointer-events-none absolute inset-0 h-screen bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(255,189,122,0.2),rgba(255,255,255,0))] dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.5),rgba(255,255,255,0))]" />{/* Grid Pattern */}- <GridPattern+ {/* <GridPatternwidth={80}height={80}x={-1}@@ -34,7 +32,7 @@ export default async function MarketingLayout({"-z-50 [mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)]","inset-x-0 -top-[1rem] -z-50 h-[80%] skew-y-12",)}- />+ /> */}{/* Linear Gradient */}{/* <LinearGradientdiff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsxindex 34b5e029..4db2f3c7 100644--- a/app/(marketing)/page.tsx+++ b/app/(marketing)/page.tsx@@ -1,6 +1,7 @@import Hero from "@/components/landing/hero";-import Testimonials from "@/components/landing/testimonials";import Faq from "@/components/pricing/faq";+import Pricing from "@/components/pricing/pricing";+import Testimonials from "@/components/pricing/testimonials";export default async function Home() {return (@@ -11,6 +12,7 @@ export default async function Home() {{/* <FeatureGrid /> */}{/* <FeatureSections /> */}{/* <ChangelogSection /> */}+ <Pricing /><Faq /></>);diff --git a/app/(marketing)/pricing/page.tsx b/app/(marketing)/pricing/page.tsxindex 05b1c797..d791ce61 100644--- a/app/(marketing)/pricing/page.tsx+++ b/app/(marketing)/pricing/page.tsx@@ -1,10 +1,7 @@-import { PriceCard } from "@/components/price-card";import Faq from "@/components/pricing/faq";+import Pricing from "@/components/pricing/pricing";import Testimonials from "@/components/pricing/testimonials";-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";export const metadata = constructMetadata({title: "Lifetime Access to Beautifully Crafted Tailwind CSS Components",@@ -13,50 +10,19 @@ export const metadata = constructMetadata({image: absoluteUrl(`/api/og`),});-export default function Pricing() {+export default function PricingPage() {return (- <>- <section id="pricing" className="py-14">- <div className="mx-auto max-w-screen-xl 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/80">- 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>- <div- className={`absolute inset-0 -z-10 m-auto h-full max-h-[800px] w-full max-w-[800px] rounded-full opacity-20 blur-[150px]`}- style={{- background:- "linear-gradient(180deg, #9E7AFF 0%,#FE8BBB 33.33%,#FFBD7A 66.67%,#F8EAC3 100%)",- }}- ></div>- <MagicContainer className="mx-auto mt-16 grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-2">- {plans.map((item, idx) => (- <PriceCard- key={idx}- item={item}- className="h-fit max-w-[400px]"- />- ))}- </MagicContainer>- </div>- </section>+ <div className="relative">+ <div+ className={`absolute inset-0 -z-10 m-auto h-full max-h-[800px] w-full max-w-[800px] rounded-full opacity-20 blur-[150px]`}+ style={{+ background:+ "linear-gradient(180deg, #9E7AFF 0%,#FE8BBB 33.33%,#FFBD7A 66.67%,#F8EAC3 100%)",+ }}+ ></div>+ <Pricing /><Testimonials /><Faq />- </>+ </div>);}diff --git a/components/landing/buy-button.tsx b/components/landing/buy-button.tsxindex ab3baf09..8f0b5084 100644--- a/components/landing/buy-button.tsx+++ b/components/landing/buy-button.tsx@@ -36,7 +36,7 @@ const UnPaid = ({ className }: { className?: string }) => {"transform-gpu rounded-sm ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",)}>- Get Lifetime Access - $79+ Get Lifetime Access</Link>);};diff --git a/components/landing/hero-client.tsx b/components/landing/hero-client.tsxnew file mode 100644index 00000000..1d3447dc--- /dev/null+++ b/components/landing/hero-client.tsx@@ -0,0 +1,229 @@+"use client";++import { Doc } from "@/.contentlayer/generated";+import BuyButton from "@/components/landing/buy-button";+import { buttonVariants } from "@/components/ui/button";+import { Separator } from "@/components/ui/separator";+import { cn } from "@/lib/utils";+import AnimatedGradientText from "@/registry/components/magicui/animated-gradient-text";+import { BorderBeam } from "@/registry/components/magicui/border-beam";+import FadeIn from "@/registry/components/magicui/fade-in";+import NumberTicker from "@/registry/components/magicui/number-ticker";+import RetroGrid from "@/registry/components/magicui/retro-grid";+import { StarFilledIcon } from "@radix-ui/react-icons";+import { motion, useInView } from "framer-motion";+import { ChevronRight } from "lucide-react";+import Link from "next/link";+import { useRef } from "react";++export default function HeroClient({+ payments,+ post,+}: {+ payments: number;+ post: Doc;+}) {+ const fadeInRef = useRef(null);+ const fadeInInView = useInView(fadeInRef, {+ once: true,+ });++ const fadeUpVariants = {+ initial: {+ opacity: 0,+ y: 24,+ },+ animate: {+ opacity: 1,+ y: 0,+ },+ };++ return (+ <section id="hero">+ <div className="relative h-full overflow-hidden py-14">+ <RetroGrid className="z-0" />+ <div className="container z-10 flex flex-col">+ <div className="mt-20 grid grid-cols-1">+ <div className="flex flex-col items-center gap-6 pb-8 text-center">+ <FadeIn>+ <Link href={post.slug}>+ <AnimatedGradientText>+ <div+ className={cn(+ `absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,+ `p-[1px] ![mask-composite:subtract]`,+ )}+ />+ π <Separator className="mx-2 h-4" orientation="vertical" />{" "}+ <span+ className={cn(+ `animate-gradient bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent`,+ `inline`,+ )}+ >+ Introducing {post.title}+ </span>+ <ChevronRight className="ml-1 h-4 w-4 text-gray-500" />+ </AnimatedGradientText>+ </Link>+ </FadeIn>+ <motion.h1+ ref={fadeInRef}+ className="text-balance bg-gradient-to-br from-black from-30% to-black/60 bg-clip-text py-6 text-5xl font-medium leading-none tracking-tighter text-transparent dark:from-white dark:to-white/40 sm:text-6xl md:text-7xl lg:text-8xl"+ animate={fadeInInView ? "animate" : "initial"}+ variants={fadeUpVariants}+ initial={false}+ transition={{+ duration: 0.6,+ delay: 0.1,+ ease: [0.21, 0.47, 0.32, 0.98],+ type: "spring",+ }}+ >+ Create Magical <br /> Landing Pages <br />+ </motion.h1>++ <motion.p+ className="text-balance text-lg tracking-tight text-gray-400 md:text-xl"+ animate={fadeInInView ? "animate" : "initial"}+ variants={fadeUpVariants}+ initial={false}+ transition={{+ duration: 0.6,+ delay: 0.2,+ ease: [0.21, 0.47, 0.32, 0.98],+ type: "spring",+ }}+ >+ Magic UI is the largest collection of professional handcrafted+ components in the world. Save thousands of hours, and ship a+ beautiful landing page to impress your customers in minutes.+ </motion.p>++ <motion.div+ animate={fadeInInView ? "animate" : "initial"}+ variants={fadeUpVariants}+ className="flex flex-col gap-4 lg:flex-row"+ initial={false}+ transition={{+ duration: 0.6,+ delay: 0.3,+ ease: [0.21, 0.47, 0.32, 0.98],+ type: "spring",+ }}+ >+ <div className="flex flex-col gap-4 md:flex-row">+ <BuyButton />+ <Link+ href="/components"+ className={cn(+ buttonVariants({+ variant: "outline",+ size: "lg",+ }),+ "gap-2 whitespace-pre md:flex",+ "group relative w-full gap-1 overflow-hidden rounded-sm text-sm font-semibold tracking-tighter",+ )}+ >+ Read Docs+ </Link>+ </div>+ </motion.div>+ <FadeIn delay={0.3}>+ <div className="container flex flex-col items-center justify-center gap-2 sm:flex-row">+ <div className="flex flex-row items-center justify-center -space-x-4">+ <img+ src="https://randomuser.me/api/portraits/women/72.jpg"+ className="h-10 w-10 rounded-full border-2 border-white"+ />+ <img+ src="https://randomuser.me/api/portraits/men/94.jpg"+ className="h-10 w-10 rounded-full border-2 border-white"+ />+ <img+ src="https://randomuser.me/api/portraits/women/34.jpg"+ className="h-10 w-10 rounded-full border-2 border-white"+ />+ <img+ src="https://randomuser.me/api/portraits/men/86.jpg"+ className="h-10 w-10 rounded-full border-2 border-white"+ />+ <img+ src="https://randomuser.me/api/portraits/women/41.jpg"+ className="h-10 w-10 rounded-full border-2 border-white"+ />+ </div>++ <div className="flex flex-col gap-x-2">+ <div className="flex flex-row items-center justify-start">+ <StarFilledIcon className="h-4 w-4 text-orange-300" />+ <StarFilledIcon className="h-4 w-4 text-orange-300" />+ <StarFilledIcon className="h-4 w-4 text-orange-300" />+ <StarFilledIcon className="h-4 w-4 text-orange-300" />+ <StarFilledIcon className="h-4 w-4 text-orange-300" />+ <span className="ml-2 text-base font-bold">5.0</span>+ </div>++ <span className="inline-block text-center text-xs font-medium leading-snug tracking-tighter">+ <NumberTicker+ value={payments}+ className="font-extrabold"+ delay={0.2}+ />{" "}+ developers making beautiful landing pages+ </span>+ </div>+ </div>+ </FadeIn>+ </div>+ </div>++ <motion.div+ animate={fadeInInView ? "animate" : "initial"}+ variants={fadeUpVariants}+ initial={false}+ transition={{+ duration: 1.4,+ delay: 0.4,+ ease: [0.21, 0.47, 0.32, 0.98],+ type: "spring",+ }}+ className="relative mx-auto mt-24 h-full w-full max-w-[1200px] rounded-xl after:absolute after:inset-0 after:z-10 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_30%,transparent)]"+ >+ <div+ className={cn(+ "absolute inset-0 bottom-1/2 h-full w-full [filter:blur(120px)] ",++ // light styles+ "[background-image:linear-gradient(to_bottom,rgba(255,189,122,0.2),transparent_30%)]",++ // dark styles+ "dark:[background-image:linear-gradient(to_bottom,rgba(120,119,198,0.5),transparent_30%)]",+ )}+ />++ <img+ src="/dashboard-light.png"+ className="relative block h-full w-full rounded-xl border dark:hidden"+ />+ <img+ src="/dashboard-dark.png"+ className="relative hidden h-full w-full rounded-xl border dark:block"+ />+ {/* <video+ autoPlay+ loop+ muted+ src="demo.mp4"+ className="h-auto w-full"+ /> */}++ <BorderBeam size={150} />+ <BorderBeam size={150} delay={7} />+ </motion.div>+ </div>+ </div>+ </section>+ );+}diff --git a/components/landing/hero.tsx b/components/landing/hero.tsxindex f513027d..a932f4b6 100644--- a/components/landing/hero.tsx+++ b/components/landing/hero.tsx@@ -1,16 +1,7 @@import { allDocs } from "@/.contentlayer/generated";-import BuyButton from "@/components/landing/buy-button";-import { buttonVariants } from "@/components/ui/button";-import { Separator } from "@/components/ui/separator";+import HeroClient from "@/components/landing/hero-client";import { db } from "@/lib/db";-import { cn } from "@/lib/utils";-import FadeIn from "@/registry/components/magicui/fade-in";-import NumberTicker from "@/registry/components/magicui/number-ticker";-import { StarFilledIcon } from "@radix-ui/react-icons";import { compareDesc } from "date-fns";-import { ChevronRight } from "lucide-react";-import Link from "next/link";-import { CSSProperties } from "react";export default async function Hero() {const payments = await db.payment.count({@@ -31,94 +22,5 @@ export default async function Hero() {return compareDesc(new Date(a.date), new Date(b.date)); // Both dates are defined, proceed with comparison})[0];- return (- <section id="hero" className="container py-14">- <div className="container flex max-w-[64rem] flex-col items-center gap-6 pb-8 pt-20 text-center md:pb-12">- <FadeIn>- <Link- href={post.slug}- className={cn(- "relative flex flex-row items-center justify-center",- "rounded-2xl px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f]",- "transition-shadow duration-500 ease-out hover:shadow-[inset_0_-5px_10px_#8fdfff3f]",- )}- style={- {- "--bg-size": "300%",- } as CSSProperties- }- >- <div- className={cn(- `absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,- `p-[1px] ![mask-composite:subtract]`,- )}- />- π <Separator className="mx-2 h-4" orientation="vertical" />{" "}- <span- className={cn(- `animate-gradient bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent`,- `inline`,- )}- >- Introducing {post.title}- </span>- <ChevronRight className="ml-1 h-4 w-4 text-gray-500" />- </Link>- </FadeIn>- <FadeIn>- <h1 className="text-5xl font-bold tracking-tighter sm:text-6xl md:text-7xl lg:text-8xl">- Create Magical <br /> Landing Pages <br />- </h1>- </FadeIn>- <FadeIn delay={0.1}>- <p className="text-sm leading-normal text-muted-foreground sm:text-xl">- Magic UI is a curated collection of React + Tailwind CSS + Framer- Motion components- </p>- </FadeIn>- <FadeIn delay={0.2}>- <div className="flex flex-col gap-4 md:flex-row">- <BuyButton />- <Link- href="/components"- className={cn(- buttonVariants({- variant: "outline",- size: "lg",- }),- "gap-2 whitespace-pre md:flex",- "group relative w-full gap-1 overflow-hidden rounded-sm text-sm font-semibold tracking-tighter",- )}- >- Read Docs- </Link>- </div>- </FadeIn>- <FadeIn delay={0.3}>- <div className="container flex flex-col items-center justify-center sm:flex-row">- <div className="flex flex-row">- <StarFilledIcon className="h-4 w-4 text-yellow-300" />- <StarFilledIcon className="h-4 w-4 text-yellow-300" />- <StarFilledIcon className="h-4 w-4 text-yellow-300" />- <StarFilledIcon className="h-4 w-4 text-yellow-300" />- <StarFilledIcon className="h-4 w-4 text-yellow-300" />- </div>-- <span className="mx-1.5 hidden h-1 w-1 rounded-full bg-gray-500 dark:bg-gray-400 sm:block" />-- <span className="inline-block text-center text-xs font-medium leading-snug tracking-tighter">- Trusted by{" "}- <NumberTicker- value={payments}- className="font-bold"- delay={0.2}- />{" "}- developers to make beautiful landing pages- </span>- </div>- </FadeIn>- </div>- </section>- );+ return <HeroClient payments={payments} post={post} />;}diff --git a/components/pricing/faq.tsx b/components/pricing/faq.tsxindex 368691ff..f5b16236 100644--- a/components/pricing/faq.tsx+++ b/components/pricing/faq.tsx@@ -82,7 +82,7 @@ const faqs = [},];-const Faq = () => {+export default function FAQ() {return (<section id="faqs" className="container py-14"><h2 className="mb-4 text-center text-5xl font-bold tracking-tight text-foreground">@@ -125,6 +125,4 @@ const Faq = () => {</h3></section>);-};--export default Faq;+}diff --git a/components/pricing/pricing.tsx b/components/pricing/pricing.tsxnew file mode 100644index 00000000..66009625--- /dev/null+++ b/components/pricing/pricing.tsx@@ -0,0 +1,38 @@+import { PriceCard } from "@/components/price-card";+import { plans } from "@/config/pricing";+import FadeIn from "@/registry/components/magicui/fade-in";+import { MagicContainer } from "@/registry/components/magicui/magic-card";++export default function Pricing() {+ return (+ <section id="pricing" className="py-14">+ <div className="mx-auto max-w-screen-xl 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/80">+ 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="mx-auto mt-16 grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-2">+ {plans.map((item, idx) => (+ <PriceCard key={idx} item={item} className="h-fit max-w-[400px]" />+ ))}+ </MagicContainer>+ </div>+ </section>+ );+}diff --git a/components/site-banner.tsx b/components/site-banner.tsxindex c141faf2..5a525a08 100644--- a/components/site-banner.tsx+++ b/components/site-banner.tsx@@ -11,15 +11,15 @@ export function SiteBanner() {β¨<span className="font-bold text-black dark:text-white">{" "}- Black Friday Sale -{" "}+ New Page Sections Launch Sale -{" "}</span>{" "}Get{" "}<span className="font-bold text-black dark:text-white">- $30 off on Friday November 24th ONLY+ $30 off</span>{" "}with code{" "}- <span className="rounded-md bg-green-600 p-1 font-bold text-black dark:text-white">- ONEDAYSPECIAL+ <span className="rounded-md bg-orange-400 p-1 font-bold text-black dark:text-white">+ BLOCKPARTY</span>{" "}β¨</Link>diff --git a/registry/blocks/example/hero-1.tsx b/registry/blocks/example/hero-1.tsxindex 60c91164..6896e8c4 100644--- a/registry/blocks/example/hero-1.tsx+++ b/registry/blocks/example/hero-1.tsx@@ -103,7 +103,7 @@ export default function Hero() {ease: [0.21, 0.47, 0.32, 0.98],type: "spring",}}- className="relative mt-24 h-full w-full rounded-xl after:absolute after:inset-0 after:z-50 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_30%,transparent)]"+ className="relative mt-24 h-full w-full rounded-xl after:absolute after:inset-0 after:z-10 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_30%,transparent)]"><divclassName={cn(diff --git a/registry/blocks/example/pricing-1.tsx b/registry/blocks/example/pricing-1.tsxindex e564794c..2a384562 100644--- a/registry/blocks/example/pricing-1.tsx+++ b/registry/blocks/example/pricing-1.tsx@@ -129,7 +129,7 @@ export default function Pricing() {className={cn(" relative flex h-full max-w-[400px] flex-col gap-8 overflow-hidden rounded-2xl border p-4 text-black dark:text-white",{- "border-4 border-neutral-700 shadow-lg shadow-neutral-500 dark:border-neutral-400 dark:shadow-neutral-600":+ "border-2 border-neutral-700 shadow-lg shadow-neutral-500 dark:border-neutral-400 dark:shadow-neutral-600":price.isMostPopular,},)}diff --git a/registry/components/magicui/animated-gradient-text.tsx b/registry/components/magicui/animated-gradient-text.tsxindex 3c3e7fc7..5f2a90e0 100644--- a/registry/components/magicui/animated-gradient-text.tsx+++ b/registry/components/magicui/animated-gradient-text.tsx@@ -9,8 +9,7 @@ export default function AnimatedGradientText({className?: string;}) {return (- <a- href="/"+ <divclassName={cn("group relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-2xl bg-white/40 px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f] backdrop-blur-sm transition-shadow duration-500 ease-out [--bg-size:300%] hover:shadow-[inset_0_-5px_10px_#8fdfff3f] dark:bg-black/40",className,@@ -21,6 +20,6 @@ export default function AnimatedGradientText({/>{children}- </a>+ </div>);}diff --git a/registry/components/magicui/retro-grid.tsx b/registry/components/magicui/retro-grid.tsxindex 9f61d1b3..13c4108f 100644--- a/registry/components/magicui/retro-grid.tsx+++ b/registry/components/magicui/retro-grid.tsx@@ -24,6 +24,9 @@ export default function RetroGrid({ className }: { className?: string }) {)}/></div>++ {/* Background Gradient */}+ <div className="absolute inset-0 bg-gradient-to-t from-white to-transparent to-90% dark:from-black" /></div>);}