Skip to content

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

fix: update text shimmer and add gradient text

Dillion Verma75f680192465
diff --git a/config/docs.ts b/config/docs.ts
index 59984478..30e5376b 100644
--- a/config/docs.ts
+++ b/config/docs.ts
@@ -169,12 +169,6 @@ export const docsConfig: DocsConfig = {
href: `/docs/components/globe`,
items: [],
},
- {
- title: "Animated Gradient Pill",
- href: `/docs/components/animated-gradient-pill`,
- items: [],
- label: "New",
- },
],
},
@@ -222,10 +216,16 @@ export const docsConfig: DocsConfig = {
items: [],
},
{
- title: "Text Shimmer",
- href: `/docs/components/text-shimmer`,
+ title: "Animated Shiny Text",
+ href: `/docs/components/animated-shiny-text`,
items: [],
},
+ {
+ title: "Animated Gradient Text",
+ href: `/docs/components/animated-gradient-text`,
+ items: [],
+ label: "New",
+ },
{
title: "Text Reveal",
href: `/docs/components/text-reveal`,
diff --git a/content/docs/components/animated-gradient-pill.mdx b/content/docs/components/animated-gradient-text.mdx
similarity index 79%
rename from content/docs/components/animated-gradient-pill.mdx
rename to content/docs/components/animated-gradient-text.mdx
index aafd646d..f4777c25 100644
--- a/content/docs/components/animated-gradient-pill.mdx
+++ b/content/docs/components/animated-gradient-text.mdx
@@ -1,13 +1,13 @@
---
-title: Animated Gradient Pill
+title: Animated Gradient Text
date: 2024-04-09
description: An animated gradient background which transitions between colors for text.
author: dillionverma
published: true
-video: https://cdn.magicui.design/animated-gradient-pill.mp4
+video: https://cdn.magicui.design/animated-gradient-text.mp4
---
-<ComponentPreview name="animated-gradient-pill-demo" />
+<ComponentPreview name="animated-gradient-text-demo" />
<Steps>
@@ -36,10 +36,10 @@ module.exports = {
```
```text
-components/magicui/animated-gradient-pill.tsx
+components/magicui/animated-gradient-text.tsx
```
-<ComponentSource name="animated-gradient-pill" />
+<ComponentSource name="animated-gradient-text" />
</Steps>
diff --git a/content/docs/components/text-shimmer.mdx b/content/docs/components/animated-shiny-text.mdx
similarity index 83%
rename from content/docs/components/text-shimmer.mdx
rename to content/docs/components/animated-shiny-text.mdx
index 096c4c25..9aa60e94 100644
--- a/content/docs/components/text-shimmer.mdx
+++ b/content/docs/components/animated-shiny-text.mdx
@@ -1,13 +1,13 @@
---
-title: Text Shimmer
+title: Animated Shiny Text
date: 2024-01-16
description: A light glare effect which pans across text making it appear as if it is shimmering.
author: dillionverma
published: true
-video: https://cdn.magicui.design/text-shimmer.mp4
+video: https://cdn.magicui.design/animated-shiny-text.mp4
---
-<ComponentPreview name="text-shimmer-demo" />
+<ComponentPreview name="animated-shiny-text-demo" />
<Steps>
@@ -39,10 +39,10 @@ module.exports = {
```
```text
-components/magicui/text-shimmer.tsx
+components/magicui/animated-shiny-text.tsx
```
-<ComponentSource name="text-shimmer" />
+<ComponentSource name="animated-shiny-text" />
</Steps>
diff --git a/registry/components/example/animated-gradient-pill-demo.tsx b/registry/components/example/animated-gradient-text-demo.tsx
similarity index 73%
rename from registry/components/example/animated-gradient-pill-demo.tsx
rename to registry/components/example/animated-gradient-text-demo.tsx
index cda66f2e..39f3e574 100644
--- a/registry/components/example/animated-gradient-pill-demo.tsx
+++ b/registry/components/example/animated-gradient-text-demo.tsx
@@ -1,11 +1,11 @@
import { cn } from "@/lib/utils";
-import AnimatedGradientPill from "@/registry/components/magicui/animated-gradient-pill";
+import AnimatedGradientText from "@/registry/components/magicui/animated-gradient-text";
import { ChevronRight } from "lucide-react";
-export default async function AnimatedGradientPillDemo() {
+export default async function AnimatedGradientTextDemo() {
return (
<div className="z-10 flex min-h-[16rem] items-center justify-center">
- <AnimatedGradientPill>
+ <AnimatedGradientText>
🎉 <hr className="mx-2 h-4 w-[1px] shrink-0 bg-border" />{" "}
<span
className={cn(
@@ -15,7 +15,7 @@ export default async function AnimatedGradientPillDemo() {
Introducing Magic UI
</span>
<ChevronRight className="ml-1 h-4 w-4 text-gray-500" />
- </AnimatedGradientPill>
+ </AnimatedGradientText>
</div>
);
}
diff --git a/registry/components/example/text-shimmer-demo.tsx b/registry/components/example/animated-shiny-text-demo.tsx
similarity index 84%
rename from registry/components/example/text-shimmer-demo.tsx
rename to registry/components/example/animated-shiny-text-demo.tsx
index ab54c86d..2c793981 100644
--- a/registry/components/example/text-shimmer-demo.tsx
+++ b/registry/components/example/animated-shiny-text-demo.tsx
@@ -1,5 +1,5 @@
import { cn } from "@/lib/utils";
-import TextShimmer from "@/registry/components/magicui/text-shimmer";
+import TextShimmer from "@/registry/components/magicui/animated-shiny-text";
import { ArrowRightIcon } from "@radix-ui/react-icons";
export default async function TextShimmerDemo() {
@@ -12,7 +12,7 @@ export default async function TextShimmerDemo() {
>
<TextShimmer className="inline-flex items-center justify-center px-4 py-1">
<span>✨ Introducing Magic UI</span>
- <ArrowRightIcon className="size-3 ml-1 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />
+ <ArrowRightIcon className="ml-1 size-3 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />
</TextShimmer>
</div>
</div>
diff --git a/registry/components/magicui/animated-gradient-pill.tsx b/registry/components/magicui/animated-gradient-text.tsx
similarity index 94%
rename from registry/components/magicui/animated-gradient-pill.tsx
rename to registry/components/magicui/animated-gradient-text.tsx
index e404fa58..0bdd41db 100644
--- a/registry/components/magicui/animated-gradient-pill.tsx
+++ b/registry/components/magicui/animated-gradient-text.tsx
@@ -1,6 +1,6 @@
import { ReactNode } from "react";
-export default function AnimatedGradientPill({
+export default function AnimatedGradientText({
children,
}: {
children: ReactNode;
diff --git a/registry/components/magicui/text-shimmer.tsx b/registry/components/magicui/animated-shiny-text.tsx
similarity index 87%
rename from registry/components/magicui/text-shimmer.tsx
rename to registry/components/magicui/animated-shiny-text.tsx
index 44e293bb..543ec8ff 100644
--- a/registry/components/magicui/text-shimmer.tsx
+++ b/registry/components/magicui/animated-shiny-text.tsx
@@ -1,13 +1,13 @@
import { cn } from "@/lib/utils";
import { CSSProperties, FC, ReactNode } from "react";
-interface TextShimmerProps {
+interface AnimatedShinyTextProps {
children: ReactNode;
className?: string;
shimmerWidth?: number;
}
-const TextShimmer: FC<TextShimmerProps> = ({
+const AnimatedShinyText: FC<AnimatedShinyTextProps> = ({
children,
className,
shimmerWidth = 100,
@@ -36,4 +36,4 @@ const TextShimmer: FC<TextShimmerProps> = ({
);
};
-export default TextShimmer;
+export default AnimatedShinyText;
diff --git a/registry/index.tsx b/registry/index.tsx
index 9aec4b08..c057566a 100644
--- a/registry/index.tsx
+++ b/registry/index.tsx
@@ -97,10 +97,10 @@ const ui: Registry = {
type: "components:ui",
files: ["registry/components/magicui/animated-lines.tsx"],
},
- "text-shimmer": {
- name: "text-shimmer",
+ "animated-shiny-text": {
+ name: "animated-shiny-text",
type: "components:ui",
- files: ["registry/components/magicui/text-shimmer.tsx"],
+ files: ["registry/components/magicui/animated-shiny-text.tsx"],
},
"animated-grid-pattern": {
name: "animated-grid-pattern",
@@ -122,10 +122,10 @@ const ui: Registry = {
type: "components:ui",
files: ["registry/components/magicui/text-reveal.tsx"],
},
- "animated-gradient-pill": {
- name: "animated-gradient-pill",
+ "animated-gradient-text": {
+ name: "animated-gradient-text",
type: "components:ui",
- files: ["registry/components/magicui/animated-gradient-pill.tsx"],
+ files: ["registry/components/magicui/animated-gradient-text.tsx"],
},
};
@@ -355,12 +355,12 @@ const example: Registry = {
() => import("@/registry/components/example/animated-lines-demo"),
),
},
- "text-shimmer-demo": {
- name: "text-shimmer-demo",
+ "animated-shiny-text-demo": {
+ name: "animated-shiny-text-demo",
type: "components:example",
- files: ["registry/components/example/text-shimmer-demo.tsx"],
+ files: ["registry/components/example/animated-shiny-text-demo.tsx"],
component: React.lazy(
- () => import("@/registry/components/example/text-shimmer-demo"),
+ () => import("@/registry/components/example/animated-shiny-text-demo"),
),
},
@@ -519,12 +519,12 @@ const example: Registry = {
() => import("@/registry/components/example/text-reveal-demo"),
),
},
- "animated-gradient-pill-demo": {
- name: "animated-gradient-pill-demo",
+ "animated-gradient-text-demo": {
+ name: "animated-gradient-text-demo",
type: "components:example",
- files: ["registry/components/example/animated-gradient-pill-demo.tsx"],
+ files: ["registry/components/example/animated-gradient-text-demo.tsx"],
component: React.lazy(
- () => import("@/registry/components/example/animated-gradient-pill-demo"),
+ () => import("@/registry/components/example/animated-gradient-text-demo"),
),
},
};