UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
🐛 fix: refactor styles
Dillion Verma1b58d0b5d6af
diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsxindex 45e8bd9a..06ac60c2 100644--- a/app/(docs)/layout.tsx+++ b/app/(docs)/layout.tsx@@ -21,7 +21,7 @@ export default async function MarketingLayout({<SiteFooter />{/* Top Ellipse Gradient */}- <div className="pointer-events-none absolute inset-0 h-screen 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(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))]" />{/* Grid Pattern */}<GridPattern@@ -30,9 +30,9 @@ export default async function MarketingLayout({x={-1}y={-1}className={cn(- "absolute inset-0 h-screen w-screen fill-white/10 stroke-white/10",+ "absolute inset-0 h-screen w-screen fill-black/10 stroke-black/10 dark:fill-white/10 dark:stroke-white/10","-z-50 [mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)]",- "inset-x-0 -top-[4rem] -z-50 skew-y-12",+ "inset-x-0 -top-[1rem] -z-50 h-[80%] skew-y-12",)}/>diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsxindex c457de69..9891103b 100644--- a/app/(marketing)/layout.tsx+++ b/app/(marketing)/layout.tsx@@ -22,7 +22,7 @@ export default async function MarketingLayout({<SiteFooter />{/* Top Ellipse Gradient */}- <div className="pointer-events-none absolute inset-0 h-screen 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(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))]" />{/* Grid Pattern */}<GridPattern@@ -31,7 +31,7 @@ export default async function MarketingLayout({x={-1}y={-1}className={cn(- "absolute inset-0 h-screen w-screen fill-white/10 stroke-white/10",+ "absolute inset-0 h-screen w-screen fill-black/10 stroke-black/10 dark:fill-white/10 dark:stroke-white/10","-z-50 [mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)]","inset-x-0 -top-[1rem] -z-50 h-[80%] skew-y-12",)}diff --git a/components/component-wrapper.tsx b/components/component-wrapper.tsxindex bcc2aa0a..7cc2aa25 100644--- a/components/component-wrapper.tsx+++ b/components/component-wrapper.tsx@@ -1,18 +1,14 @@import { cn } from "@/lib/utils";-import { CSSProperties } from "react";interface ComponentWrapperProps {className?: string;children: any;}const ComponentWrapper = ({ className, children }: ComponentWrapperProps) => {- const mask =- "linear-gradient(to bottom,transparent,#fff var(--mask-offset) calc(100% - var(--mask-offset)),transparent),linear-gradient(to right,transparent,#fff var(--mask-offset) calc(100% - var(--mask-offset)),transparent)";-return (<divclassName={cn(- "not-prose relative flex max-w-[65ch] flex-col items-center justify-center rounded-xl border p-8 md:p-20",+ "not-prose relative -z-40 flex max-w-[65ch] flex-col items-center justify-center rounded-xl border bg-background p-8 md:p-20",className,)}>@@ -20,19 +16,11 @@ const ComponentWrapper = ({ className, children }: ComponentWrapperProps) => {<divclassName={cn(- `absolute inset-0 -z-50 h-full w-full [background-size:16px_16px]`,- `bg-[radial-gradient(#00000055_1px,transparent_1px)] dark:bg-[radial-gradient(#ffffff22_1px,transparent_1px)]`,+ `absolute inset-0 -z-30 h-full w-full [background-size:16px_16px]`,+ `bg-[radial-gradient(#00000055_1px,transparent_1px)] [--mask-offset:60px] dark:bg-[radial-gradient(#ffffff22_1px,transparent_1px)]`,+ `[WebkitMask:mask:linear-gradient(to_bottom,transparent,#fff_var(--mask-offset)_calc(100%-var(--mask-offset)),transparent),linear-gradient(to_right,transparent,#fff_var(--mask-offset)_calc(100%-var(--mask-offset)),transparent)] [mask:linear-gradient(to_bottom,transparent,#fff_var(--mask-offset)_calc(100%-var(--mask-offset)),transparent),linear-gradient(to_right,transparent,#fff_var(--mask-offset)_calc(100%-var(--mask-offset)),transparent)]`,+ `[--webkit-mask-composite:source-in,xor] [mask-composite:intersect]`,)}- style={- {- "--mask-offset": "60px",- mask: mask,- WebkitMask: mask,- maskComposite: "intersect",- WebkitMaskComposite: "source-in, xor",- // backgroundImage: `linear-gradient(to right,#1f2937 1px, transparent 1px), linear-gradient(to bottom,#1f2937 1px,transparent 1px)`,- } as CSSProperties- }/></div>);diff --git a/components/landing/hero.tsx b/components/landing/hero.tsxindex 583947ab..d93c4e56 100644--- a/components/landing/hero.tsx+++ b/components/landing/hero.tsx@@ -34,7 +34,12 @@ export default function Hero() {Introducing Marquee</span><ChevronRight className="ml-1 h-4 w-4 text-gray-500" />- <div className="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%] p-[1px] [-webkit-mask-composite:subtract] [border-radius:inherit] [mask-composite:subtract] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]" />+ <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%] p-[1px] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,+ `[--webkit-mask-composite:xor] [mask-composite:xor]`,+ )}+ /></Link></FadeIn><FadeIndiff --git a/components/site-header.tsx b/components/site-header.tsxindex a9a00333..4cf090e1 100644--- a/components/site-header.tsx+++ b/components/site-header.tsx@@ -16,7 +16,7 @@ interface SiteHeaderProps {export function SiteHeader({ user }: SiteHeaderProps) {return (- <header className="supports-backdrop-blur:bg-background/60 sticky top-0 z-40 w-full backdrop-blur">+ <header className="supports-backdrop-blur:bg-background/80 sticky top-0 z-40 w-full backdrop-blur"><div className="container flex h-16 items-center"><MainNav /><MobileNav />diff --git a/registry/components/example/dot-pattern-demo.tsx b/registry/components/example/dot-pattern-demo.tsxindex c3c76dff..cfd13d00 100644--- a/registry/components/example/dot-pattern-demo.tsx+++ b/registry/components/example/dot-pattern-demo.tsx@@ -6,7 +6,7 @@ import RadialGradient from "@/registry/components/magicui/radial-gradient";const DotPatternDemo = () => {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Dot Pattern</p>diff --git a/registry/components/example/dot-pattern-linear-gradient.tsx b/registry/components/example/dot-pattern-linear-gradient.tsxindex cad0b4b4..1ff5094f 100644--- a/registry/components/example/dot-pattern-linear-gradient.tsx+++ b/registry/components/example/dot-pattern-linear-gradient.tsx@@ -6,7 +6,7 @@ import LinearGradient from "@/registry/components/magicui/linear-gradient";const DotPatternDemo2 = () => {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Dot Pattern</p>@@ -17,7 +17,6 @@ const DotPatternDemo2 = () => {cy={1}cr={1}className={cn(- "absolute inset-0 h-full w-full fill-white/20","[mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)] ",)}/>diff --git a/registry/components/example/grid-pattern-dashed.tsx b/registry/components/example/grid-pattern-dashed.tsxindex c62fa44f..09f7476c 100644--- a/registry/components/example/grid-pattern-dashed.tsx+++ b/registry/components/example/grid-pattern-dashed.tsx@@ -6,7 +6,7 @@ import RadialGradient from "@/registry/components/magicui/radial-gradient";const GridPatternDashed = () => {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Grid Pattern</p>@@ -17,7 +17,6 @@ const GridPatternDashed = () => {y={-1}strokeDasharray={"4 2"}className={cn(- "absolute inset-0 h-full w-full fill-white/10 stroke-white/10","[mask-image:radial-gradient(300px_circle_at_center,white,transparent)]",)}/>diff --git a/registry/components/example/grid-pattern-demo.tsx b/registry/components/example/grid-pattern-demo.tsxindex f9f6c27b..6d5b65f2 100644--- a/registry/components/example/grid-pattern-demo.tsx+++ b/registry/components/example/grid-pattern-demo.tsx@@ -6,7 +6,7 @@ import RadialGradient from "@/registry/components/magicui/radial-gradient";const GridPatternDemo = () => {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Grid Pattern</p>diff --git a/registry/components/example/grid-pattern-linear-gradient.tsx b/registry/components/example/grid-pattern-linear-gradient.tsxindex a9895499..93ff0451 100644--- a/registry/components/example/grid-pattern-linear-gradient.tsx+++ b/registry/components/example/grid-pattern-linear-gradient.tsx@@ -4,9 +4,9 @@ import { cn } from "@/lib/utils";import GridPattern from "@/registry/components/magicui/grid-pattern";import LinearGradient from "@/registry/components/magicui/linear-gradient";-const GridPatternDemo2 = () => {+const GridPatternLinearGradient = () => {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Grid Pattern</p>@@ -16,7 +16,6 @@ const GridPatternDemo2 = () => {x={-1}y={-1}className={cn(- "absolute inset-0 h-full w-full fill-white/10 stroke-white/10","[mask-image:linear-gradient(to_bottom_right,white,transparent,transparent)] ",)}/>@@ -29,4 +28,4 @@ const GridPatternDemo2 = () => {);};-export default GridPatternDemo2;+export default GridPatternLinearGradient;diff --git a/registry/components/example/linear-gradient-demo.tsx b/registry/components/example/linear-gradient-demo.tsxindex 9d9f3572..c7361dca 100644--- a/registry/components/example/linear-gradient-demo.tsx+++ b/registry/components/example/linear-gradient-demo.tsx@@ -2,7 +2,7 @@ import LinearGradient from "@/registry/components/magicui/linear-gradient";export default function LinearGradientDemo() {return (- <div className="relative flex h-full w-full items-center justify-center rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Linear Gradient</p>diff --git a/registry/components/example/marquee-demo.tsx b/registry/components/example/marquee-demo.tsxindex e6506221..fca24156 100644--- a/registry/components/example/marquee-demo.tsx+++ b/registry/components/example/marquee-demo.tsx@@ -81,8 +81,8 @@ const MarqueeDemo = () => {<ReviewCard key={review.username} {...review} />))}</Marquee>- <div className="pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-gray-50 dark:from-gray-950"></div>- <div className="pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-gray-50 dark:from-gray-950"></div>+ <div className="pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-slate-950"></div>+ <div className="pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-slate-950"></div></div>);};diff --git a/registry/components/example/meteors-demo.tsx b/registry/components/example/meteors-demo.tsxindex a39e926a..57cac234 100644--- a/registry/components/example/meteors-demo.tsx+++ b/registry/components/example/meteors-demo.tsx@@ -2,7 +2,7 @@ import Meteors from "@/registry/components/magicui/meteors";export default function MeteorDemo() {return (- <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 shadow-2xl"><Meteors /><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Meteorsdiff --git a/registry/components/example/radial-gradient-demo.tsx b/registry/components/example/radial-gradient-demo.tsxindex 56297b2a..85c83ed6 100644--- a/registry/components/example/radial-gradient-demo.tsx+++ b/registry/components/example/radial-gradient-demo.tsx@@ -2,7 +2,7 @@ import RadialGradient from "@/registry/components/magicui/radial-gradient";export default function RadialGradientDemo() {return (- <div className="relative flex h-full w-full items-center justify-center rounded-lg border bg-background p-20">+ <div className="relative flex h-full w-full items-center justify-center rounded-lg border bg-background p-20 shadow-2xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Radial Gradient</p>diff --git a/registry/components/magicui/dot-pattern.tsx b/registry/components/magicui/dot-pattern.tsxindex 757226bc..da7e9890 100644--- a/registry/components/magicui/dot-pattern.tsx+++ b/registry/components/magicui/dot-pattern.tsx@@ -29,7 +29,7 @@ export function DotPattern({<svgaria-hidden="true"className={cn(- "pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30",+ "pointer-events-none absolute inset-0 h-full w-full fill-gray-400/40",className,)}{...props}