-
+
{post.data?.title ?? post.url}
{post.data?.description && (
@@ -239,15 +239,17 @@ export default async function Page({
{normalizeTag(post.data?.tags).length > 0 && (
- {normalizeTag(post.data.tags).slice(0, 3).map((tag) => (
-
- {tag}
-
- ))}
+ {normalizeTag(post.data.tags)
+ .slice(0, 3)
+ .map((tag) => (
+
+ {tag}
+
+ ))}
)}
diff --git a/apps/www/components/blog/table-of-contents.tsx b/apps/www/components/blog/table-of-contents.tsx
index 557b1e62d..6a65bca64 100644
--- a/apps/www/components/blog/table-of-contents.tsx
+++ b/apps/www/components/blog/table-of-contents.tsx
@@ -16,10 +16,10 @@ const generateHeadingId = (text: string) => {
.trim()
}
-export function BlogTableOfContents({
+export function BlogTableOfContents({
className,
onLinkClick,
-}: {
+}: {
className?: string
onLinkClick?: () => void
}) {
diff --git a/apps/www/config/docs.ts b/apps/www/config/docs.ts
index 4e3ee6eae..8a40ed792 100644
--- a/apps/www/config/docs.ts
+++ b/apps/www/config/docs.ts
@@ -244,6 +244,12 @@ export const docsConfig: DocsConfig = {
href: `/docs/components/magic-card`,
items: [],
},
+ {
+ title: "Glare Hover",
+ href: `/docs/components/glare-hover`,
+ items: [],
+ label: "New",
+ },
{
title: "Meteors",
href: `/docs/components/meteors`,
diff --git a/apps/www/content/blog/typescript-vs-javascript-differences.mdx b/apps/www/content/blog/typescript-vs-javascript-differences.mdx
index 04ecda5d5..86d260d31 100644
--- a/apps/www/content/blog/typescript-vs-javascript-differences.mdx
+++ b/apps/www/content/blog/typescript-vs-javascript-differences.mdx
@@ -39,7 +39,7 @@ This comparison isn't about crowning a winner. It’s about helping you make the
-
+
|
|
-
+
|
Project Scope
|
@@ -73,7 +73,7 @@ This comparison isn't about crowning a winner. It’s about helping you make the
maintainability.
-
+
|
Error Detection
|
@@ -84,7 +84,7 @@ This comparison isn't about crowning a winner. It’s about helping you make the
Catches type-related errors during compilation, before code is run.
-
+
|
Developer Experience
|
diff --git a/apps/www/content/docs/components/glare-hover.mdx b/apps/www/content/docs/components/glare-hover.mdx
new file mode 100644
index 000000000..7bb6685b3
--- /dev/null
+++ b/apps/www/content/docs/components/glare-hover.mdx
@@ -0,0 +1,124 @@
+---
+title: Glare Hover
+date: 2024-12-19
+description: A component that creates a subtle glare effect that animates across the element on hover.
+author: magicui
+published: true
+---
+
+
+
+## Examples
+
+### Custom Color - Blue
+
+
+
+### Custom Color - Purple
+
+
+
+## Installation
+
+
+
+
+ CLI
+ Manual
+
+
+
+```bash
+npx shadcn@latest add @magicui/glare-hover
+```
+
+
+
+
+
+
+
+Copy and paste the following code into your project.
+
+
+
+Update the import paths to match your project setup.
+
+
+
+
+
+
+
+## Usage
+
+```tsx showLineNumbers
+import { GlareHover } from "@/registry/magicui/glare-hover"
+```
+
+```tsx showLineNumbers
+
+
+
+ Hello World
+ Hover over this card to see the effect
+
+
+
+```
+
+```tsx showLineNumbers
+
+
+
+ Custom Rotation
+ With custom rotation angle
+
+
+
+```
+
+### Customizing the Glare Color
+
+You can customize the glare effect color by using the `glareClassName` prop with Tailwind's `via-` utility classes. The component uses a gradient with `via-black/15` by default (and `via-white/50` in dark mode), which you can override.
+
+```tsx showLineNumbers
+
+
+
+ Custom Color
+ With blue glare effect
+
+
+
+```
+
+```tsx showLineNumbers
+
+
+
+ Purple Glare
+ With purple glare effect
+
+
+
+```
+
+## Props
+
+### GlareHover
+
+| Prop name | Type | Default | Description |
+| ---------------- | ----------------- | ------- | ---------------------------------------------------- |
+| `children` | `React.ReactNode` | `-` | The content to be wrapped with the glare effect |
+| `className` | `string` | `-` | Additional CSS classes for the root container |
+| `glareClassName` | `string` | `-` | Additional CSS classes for the glare element. Use `via-` Tailwind classes to customize the glare color (e.g., `via-blue-500/30`) |
+| `rotate` | `number` | `45` | Rotation angle in degrees for the glare effect |
+
+The glare effect uses a gradient that automatically adapts to light and dark themes, creating a subtle shine effect that moves across the element on hover. By default, it uses `via-black/15` in light mode and `via-white/50` in dark mode, but you can customize it using the `glareClassName` prop with Tailwind's `via-` utility classes.
diff --git a/apps/www/mdx-components.tsx b/apps/www/mdx-components.tsx
index 35f658e7c..94ef6cf06 100644
--- a/apps/www/mdx-components.tsx
+++ b/apps/www/mdx-components.tsx
@@ -100,10 +100,7 @@ export const mdxComponents = {
/>
),
p: ({ className, ...props }: React.ComponentProps<"p">) => (
-
+
),
strong: ({ className, ...props }: React.HTMLAttributes) => (
@@ -119,7 +116,10 @@ export const mdxComponents = {
),
blockquote: ({ className, ...props }: React.ComponentProps<"blockquote">) => (
),
@@ -128,40 +128,30 @@ export const mdxComponents = {
),
iframe: ({ className, ...props }: React.ComponentProps<"iframe">) => (
-
+
),
hr: ({ className, ...props }: React.ComponentProps<"hr">) => (
-
+
),
table: ({ className, ...props }: React.ComponentProps<"table">) => (
),
thead: ({ className, ...props }: React.ComponentProps<"thead">) => (
-
+
),
tr: ({ className, ...props }: React.ComponentProps<"tr">) => (
{
+ /**
+ * The rotation angle in degrees for the glare effect.
+ * @default 45
+ */
+ rotate?: number
+ /**
+ * Additional CSS classes to apply to the glare element.
+ */
+ glareClassName?: string
+}
+
+function GlareHover({
+ children,
+ rotate = 45,
+ className,
+ glareClassName,
+ ...props
+}: GlareHoverProps) {
+ return (
+
+ {children}
+
+
+ )
+}
+
+export { GlareHover }
+
+
+===== EXAMPLE: glare-hover-demo =====
+Title: Glare Hover Demo
+
+--- file: example/glare-hover-demo.tsx ---
+"use client"
+
+import { Sparkles } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemo() {
+ return (
+
+
+
+
+
+
+
+
+
+ Interactive Glare Effect
+
+ Hover to see the magic
+
+
+
+
+
+
+ This component adds a subtle glare effect that smoothly animates
+ across the element when you hover over it. Perfect for adding a
+ premium, polished feel to your UI components.
+
+
+
+
+
+ )
+}
+
+
+===== EXAMPLE: glare-hover-demo-blue =====
+Title: Glare Hover Demo - Blue
+
+--- file: example/glare-hover-demo-blue.tsx ---
+"use client"
+
+import { TrendingUp, Users, Zap } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemoBlue() {
+ return (
+
+
+
+
+ Performance Metrics
+ Real-time analytics dashboard
+
+
+
+
+
+
+
+ )
+}
+
+
+===== EXAMPLE: glare-hover-demo-purple =====
+Title: Glare Hover Demo - Purple
+
+--- file: example/glare-hover-demo-purple.tsx ---
+"use client"
+
+import { Award, CheckCircle2 } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemoPurple() {
+ return (
+
+
+
+
+
+
+
+ Achievement Unlocked!
+
+ You've reached a new milestone
+
+
+
+
+
+
+
+
+ Completed 100 tasks
+
+
+
+ Maintained 30-day streak
+
+
+
+ Earned Expert badge
+
+
+
+
+
+
+ )
+}
+
+
+
===== COMPONENT: globe =====
Title: Globe
Description: An autorotating, interactive, and highly performant globe made using WebGL.
diff --git a/apps/www/public/llms.txt b/apps/www/public/llms.txt
index 94f1e90c9..2b771dfcd 100644
--- a/apps/www/public/llms.txt
+++ b/apps/www/public/llms.txt
@@ -29,6 +29,7 @@ This file provides LLM-friendly entry points to documentation and examples.
- [Dotted Map](https://magicui.design/docs/components/dotted-map): A component with a dotted map.
- [File Tree](https://magicui.design/docs/components/file-tree): A component used to showcase the folder and file structure of a directory.
- [Flickering Grid](https://magicui.design/docs/components/flickering-grid): A flickering grid background made with SVGs, fully customizable using Tailwind CSS.
+- [Glare Hover](https://magicui.design/docs/components/glare-hover): A component that creates a subtle glare effect that animates across the element on hover.
- [Globe](https://magicui.design/docs/components/globe): An autorotating, interactive, and highly performant globe made using WebGL.
- [Grid Pattern](https://magicui.design/docs/components/grid-pattern): A background grid pattern made with SVGs, fully customizable using Tailwind CSS.
- [Hero Video Dialog](https://magicui.design/docs/components/hero-video-dialog): A hero video dialog component.
@@ -114,6 +115,9 @@ This file provides LLM-friendly entry points to documentation and examples.
- [Marquee Logos](https://github.com/magicuidesign/magicui/blob/main/example/marquee-logos.tsx): Example usage
- [Marquee 3D](https://github.com/magicuidesign/magicui/blob/main/example/marquee-3d.tsx): Example usage
- [Globe Demo](https://github.com/magicuidesign/magicui/blob/main/example/globe-demo.tsx): Example usage
+- [Glare Hover Demo](https://github.com/magicuidesign/magicui/blob/main/example/glare-hover-demo.tsx): Example usage
+- [Glare Hover Demo - Blue](https://github.com/magicuidesign/magicui/blob/main/example/glare-hover-demo-blue.tsx): Example usage
+- [Glare Hover Demo - Purple](https://github.com/magicuidesign/magicui/blob/main/example/glare-hover-demo-purple.tsx): Example usage
- [Tweet Card Demo](https://github.com/magicuidesign/magicui/blob/main/example/tweet-card-demo.tsx): Example usage
- [Tweet Card Images](https://github.com/magicuidesign/magicui/blob/main/example/tweet-card-images.tsx): Example usage
- [Tweet Card Meta Preview](https://github.com/magicuidesign/magicui/blob/main/example/tweet-card-meta-preview.tsx): Example usage
diff --git a/apps/www/public/r/glare-hover-demo-blue.json b/apps/www/public/r/glare-hover-demo-blue.json
new file mode 100644
index 000000000..afb3cebab
--- /dev/null
+++ b/apps/www/public/r/glare-hover-demo-blue.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "glare-hover-demo-blue",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Blue",
+ "description": "Example showing a blue glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-blue.tsx",
+ "content": "\"use client\"\n\nimport { TrendingUp, Users, Zap } from \"lucide-react\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { GlareHover } from \"@/registry/magicui/glare-hover\"\n\nexport default function GlareHoverDemoBlue() {\n return (\n \n
\n \n \n Performance Metrics\n Real-time analytics dashboard\n \n \n \n \n \n \n
\n )\n}\n",
+ "type": "registry:example"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/www/public/r/glare-hover-demo-purple.json b/apps/www/public/r/glare-hover-demo-purple.json
new file mode 100644
index 000000000..bac883614
--- /dev/null
+++ b/apps/www/public/r/glare-hover-demo-purple.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "glare-hover-demo-purple",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Purple",
+ "description": "Example showing a purple glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-purple.tsx",
+ "content": "\"use client\"\n\nimport { Award, CheckCircle2 } from \"lucide-react\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { GlareHover } from \"@/registry/magicui/glare-hover\"\n\nexport default function GlareHoverDemoPurple() {\n return (\n \n
\n \n \n \n
\n
\n Achievement Unlocked!\n \n You've reached a new milestone\n \n
\n
\n \n \n \n
\n \n Completed 100 tasks\n
\n
\n \n Maintained 30-day streak\n
\n
\n \n Earned Expert badge\n
\n
\n \n \n \n
\n )\n}\n",
+ "type": "registry:example"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/www/public/r/glare-hover-demo.json b/apps/www/public/r/glare-hover-demo.json
new file mode 100644
index 000000000..e120003c5
--- /dev/null
+++ b/apps/www/public/r/glare-hover-demo.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "glare-hover-demo",
+ "type": "registry:example",
+ "title": "Glare Hover Demo",
+ "description": "Example showing a subtle glare effect that animates across the element on hover.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo.tsx",
+ "content": "\"use client\"\n\nimport { Sparkles } from \"lucide-react\"\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { GlareHover } from \"@/registry/magicui/glare-hover\"\n\nexport default function GlareHoverDemo() {\n return (\n \n
\n \n \n \n
\n \n
\n
\n Interactive Glare Effect\n \n Hover to see the magic\n \n
\n
\n \n \n \n This component adds a subtle glare effect that smoothly animates\n across the element when you hover over it. Perfect for adding a\n premium, polished feel to your UI components.\n
\n \n \n \n
\n )\n}\n",
+ "type": "registry:example"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/www/public/r/glare-hover.json b/apps/www/public/r/glare-hover.json
new file mode 100644
index 000000000..d31911ba9
--- /dev/null
+++ b/apps/www/public/r/glare-hover.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "glare-hover",
+ "type": "registry:ui",
+ "title": "Glare Hover",
+ "description": "A component that creates a subtle glare effect that animates across the element on hover.",
+ "files": [
+ {
+ "path": "registry/magicui/glare-hover.tsx",
+ "content": "import type * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface GlareHoverProps extends React.ComponentProps<\"div\"> {\n /**\n * The rotation angle in degrees for the glare effect.\n * @default 45\n */\n rotate?: number\n /**\n * Additional CSS classes to apply to the glare element.\n */\n glareClassName?: string\n}\n\nfunction GlareHover({\n children,\n rotate = 45,\n className,\n glareClassName,\n ...props\n}: GlareHoverProps) {\n return (\n \n {children}\n \n
\n )\n}\n\nexport { GlareHover }\n",
+ "type": "registry:ui"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/apps/www/public/r/registry.json b/apps/www/public/r/registry.json
index 9a498d52b..77058a588 100644
--- a/apps/www/public/r/registry.json
+++ b/apps/www/public/r/registry.json
@@ -417,6 +417,18 @@
}
]
},
+ {
+ "name": "glare-hover",
+ "type": "registry:ui",
+ "title": "Glare Hover",
+ "description": "A component that creates a subtle glare effect that animates across the element on hover.",
+ "files": [
+ {
+ "path": "registry/magicui/glare-hover.tsx",
+ "type": "registry:ui"
+ }
+ ]
+ },
{
"name": "shimmer-button",
"type": "registry:ui",
@@ -1808,6 +1820,51 @@
}
]
},
+ {
+ "name": "glare-hover-demo",
+ "type": "registry:example",
+ "title": "Glare Hover Demo",
+ "description": "Example showing a subtle glare effect that animates across the element on hover.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-blue",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Blue",
+ "description": "Example showing a blue glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-blue.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-purple",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Purple",
+ "description": "Example showing a purple glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-purple.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
{
"name": "tweet-card-demo",
"type": "registry:example",
diff --git a/apps/www/public/registry.json b/apps/www/public/registry.json
index 9a498d52b..77058a588 100644
--- a/apps/www/public/registry.json
+++ b/apps/www/public/registry.json
@@ -417,6 +417,18 @@
}
]
},
+ {
+ "name": "glare-hover",
+ "type": "registry:ui",
+ "title": "Glare Hover",
+ "description": "A component that creates a subtle glare effect that animates across the element on hover.",
+ "files": [
+ {
+ "path": "registry/magicui/glare-hover.tsx",
+ "type": "registry:ui"
+ }
+ ]
+ },
{
"name": "shimmer-button",
"type": "registry:ui",
@@ -1808,6 +1820,51 @@
}
]
},
+ {
+ "name": "glare-hover-demo",
+ "type": "registry:example",
+ "title": "Glare Hover Demo",
+ "description": "Example showing a subtle glare effect that animates across the element on hover.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-blue",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Blue",
+ "description": "Example showing a blue glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-blue.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-purple",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Purple",
+ "description": "Example showing a purple glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-purple.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
{
"name": "tweet-card-demo",
"type": "registry:example",
diff --git a/apps/www/registry.json b/apps/www/registry.json
index 9a498d52b..77058a588 100644
--- a/apps/www/registry.json
+++ b/apps/www/registry.json
@@ -417,6 +417,18 @@
}
]
},
+ {
+ "name": "glare-hover",
+ "type": "registry:ui",
+ "title": "Glare Hover",
+ "description": "A component that creates a subtle glare effect that animates across the element on hover.",
+ "files": [
+ {
+ "path": "registry/magicui/glare-hover.tsx",
+ "type": "registry:ui"
+ }
+ ]
+ },
{
"name": "shimmer-button",
"type": "registry:ui",
@@ -1808,6 +1820,51 @@
}
]
},
+ {
+ "name": "glare-hover-demo",
+ "type": "registry:example",
+ "title": "Glare Hover Demo",
+ "description": "Example showing a subtle glare effect that animates across the element on hover.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-blue",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Blue",
+ "description": "Example showing a blue glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-blue.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
+ {
+ "name": "glare-hover-demo-purple",
+ "type": "registry:example",
+ "title": "Glare Hover Demo - Purple",
+ "description": "Example showing a purple glare effect using custom color classes.",
+ "registryDependencies": [
+ "@magicui/glare-hover"
+ ],
+ "files": [
+ {
+ "path": "registry/example/glare-hover-demo-purple.tsx",
+ "type": "registry:example"
+ }
+ ]
+ },
{
"name": "tweet-card-demo",
"type": "registry:example",
diff --git a/apps/www/registry/__index__.tsx b/apps/www/registry/__index__.tsx
index 28b83d4ca..c47a1175a 100644
--- a/apps/www/registry/__index__.tsx
+++ b/apps/www/registry/__index__.tsx
@@ -389,6 +389,23 @@ export const Index: Record = {
}),
meta: undefined,
},
+ "glare-hover": {
+ name: "glare-hover",
+ description: "A component that creates a subtle glare effect that animates across the element on hover.",
+ type: "registry:ui",
+ registryDependencies: undefined,
+ files: [{
+ path: "registry/magicui/glare-hover.tsx",
+ type: "registry:ui",
+ target: ""
+ }],
+ component: React.lazy(async () => {
+ const mod = await import("@/registry/magicui/glare-hover.tsx")
+ const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name
+ return { default: mod.default || mod[exportName] }
+ }),
+ meta: undefined,
+ },
"shimmer-button": {
name: "shimmer-button",
description: "A button with a shimmering light which travels around the perimeter.",
@@ -1800,6 +1817,57 @@ export const Index: Record = {
}),
meta: undefined,
},
+ "glare-hover-demo": {
+ name: "glare-hover-demo",
+ description: "Example showing a subtle glare effect that animates across the element on hover.",
+ type: "registry:example",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [{
+ path: "registry/example/glare-hover-demo.tsx",
+ type: "registry:example",
+ target: ""
+ }],
+ component: React.lazy(async () => {
+ const mod = await import("@/registry/example/glare-hover-demo.tsx")
+ const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name
+ return { default: mod.default || mod[exportName] }
+ }),
+ meta: undefined,
+ },
+ "glare-hover-demo-blue": {
+ name: "glare-hover-demo-blue",
+ description: "Example showing a blue glare effect using custom color classes.",
+ type: "registry:example",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [{
+ path: "registry/example/glare-hover-demo-blue.tsx",
+ type: "registry:example",
+ target: ""
+ }],
+ component: React.lazy(async () => {
+ const mod = await import("@/registry/example/glare-hover-demo-blue.tsx")
+ const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name
+ return { default: mod.default || mod[exportName] }
+ }),
+ meta: undefined,
+ },
+ "glare-hover-demo-purple": {
+ name: "glare-hover-demo-purple",
+ description: "Example showing a purple glare effect using custom color classes.",
+ type: "registry:example",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [{
+ path: "registry/example/glare-hover-demo-purple.tsx",
+ type: "registry:example",
+ target: ""
+ }],
+ component: React.lazy(async () => {
+ const mod = await import("@/registry/example/glare-hover-demo-purple.tsx")
+ const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name
+ return { default: mod.default || mod[exportName] }
+ }),
+ meta: undefined,
+ },
"tweet-card-demo": {
name: "tweet-card-demo",
description: "Example showing a tweet card with author info.",
diff --git a/apps/www/registry/example/glare-hover-demo-blue.tsx b/apps/www/registry/example/glare-hover-demo-blue.tsx
new file mode 100644
index 000000000..e977fd16c
--- /dev/null
+++ b/apps/www/registry/example/glare-hover-demo-blue.tsx
@@ -0,0 +1,49 @@
+"use client"
+
+import { TrendingUp, Users, Zap } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemoBlue() {
+ return (
+
+
+
+
+ Performance Metrics
+ Real-time analytics dashboard
+
+
+
+
+
+
+
+ )
+}
diff --git a/apps/www/registry/example/glare-hover-demo-purple.tsx b/apps/www/registry/example/glare-hover-demo-purple.tsx
new file mode 100644
index 000000000..026ce6093
--- /dev/null
+++ b/apps/www/registry/example/glare-hover-demo-purple.tsx
@@ -0,0 +1,55 @@
+"use client"
+
+import { Award, CheckCircle2 } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemoPurple() {
+ return (
+
+
+
+
+
+
+
+ Achievement Unlocked!
+
+ You've reached a new milestone
+
+
+
+
+
+
+
+
+ Completed 100 tasks
+
+
+
+ Maintained 30-day streak
+
+
+
+ Earned Expert badge
+
+
+
+
+
+
+ )
+}
diff --git a/apps/www/registry/example/glare-hover-demo.tsx b/apps/www/registry/example/glare-hover-demo.tsx
new file mode 100644
index 000000000..db08a8818
--- /dev/null
+++ b/apps/www/registry/example/glare-hover-demo.tsx
@@ -0,0 +1,43 @@
+"use client"
+
+import { Sparkles } from "lucide-react"
+
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { GlareHover } from "@/registry/magicui/glare-hover"
+
+export default function GlareHoverDemo() {
+ return (
+
+
+
+
+
+
+
+
+
+ Interactive Glare Effect
+
+ Hover to see the magic
+
+
+
+
+
+
+ This component adds a subtle glare effect that smoothly animates
+ across the element when you hover over it. Perfect for adding a
+ premium, polished feel to your UI components.
+
+
+
+
+
+ )
+}
diff --git a/apps/www/registry/magicui/glare-hover.tsx b/apps/www/registry/magicui/glare-hover.tsx
new file mode 100644
index 000000000..1fcb8d74d
--- /dev/null
+++ b/apps/www/registry/magicui/glare-hover.tsx
@@ -0,0 +1,45 @@
+import type * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+export interface GlareHoverProps extends React.ComponentProps<"div"> {
+ /**
+ * The rotation angle in degrees for the glare effect.
+ * @default 45
+ */
+ rotate?: number
+ /**
+ * Additional CSS classes to apply to the glare element.
+ */
+ glareClassName?: string
+}
+
+function GlareHover({
+ children,
+ rotate = 45,
+ className,
+ glareClassName,
+ ...props
+}: GlareHoverProps) {
+ return (
+
+ {children}
+
+
+ )
+}
+
+export { GlareHover }
diff --git a/apps/www/registry/registry-examples.ts b/apps/www/registry/registry-examples.ts
index e99cb2547..3970f51a6 100644
--- a/apps/www/registry/registry-examples.ts
+++ b/apps/www/registry/registry-examples.ts
@@ -479,6 +479,48 @@ export const examples: Registry["items"] = [
},
],
},
+ {
+ name: "glare-hover-demo",
+ type: "registry:example",
+ title: "Glare Hover Demo",
+ description:
+ "Example showing a subtle glare effect that animates across the element on hover.",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [
+ {
+ path: "example/glare-hover-demo.tsx",
+ type: "registry:example",
+ },
+ ],
+ },
+ {
+ name: "glare-hover-demo-blue",
+ type: "registry:example",
+ title: "Glare Hover Demo - Blue",
+ description:
+ "Example showing a blue glare effect using custom color classes.",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [
+ {
+ path: "example/glare-hover-demo-blue.tsx",
+ type: "registry:example",
+ },
+ ],
+ },
+ {
+ name: "glare-hover-demo-purple",
+ type: "registry:example",
+ title: "Glare Hover Demo - Purple",
+ description:
+ "Example showing a purple glare effect using custom color classes.",
+ registryDependencies: ["@magicui/glare-hover"],
+ files: [
+ {
+ path: "example/glare-hover-demo-purple.tsx",
+ type: "registry:example",
+ },
+ ],
+ },
{
name: "tweet-card-demo",
type: "registry:example",
diff --git a/apps/www/registry/registry-ui.ts b/apps/www/registry/registry-ui.ts
index c7cadab21..a61520e1f 100644
--- a/apps/www/registry/registry-ui.ts
+++ b/apps/www/registry/registry-ui.ts
@@ -386,6 +386,19 @@ export const ui: Registry["items"] = [
},
],
},
+ {
+ name: "glare-hover",
+ type: "registry:ui",
+ title: "Glare Hover",
+ description:
+ "A component that creates a subtle glare effect that animates across the element on hover.",
+ files: [
+ {
+ path: "magicui/glare-hover.tsx",
+ type: "registry:ui",
+ },
+ ],
+ },
{
name: "shimmer-button",
type: "registry:ui",