Skip to content

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

fix: all mdx are updated with usage example (#628)

Arghya Das0d0cda528152
diff --git a/content/docs/components/android.mdx b/content/docs/components/android.mdx
index 8eec0543..e999fc4a 100644
--- a/content/docs/components/android.mdx
+++ b/content/docs/components/android.mdx
@@ -48,6 +48,16 @@ npx shadcn@canary add "https://magicui.design/r/android"
<ComponentPreview name="android-demo-3" />
+## Usage
+
+```tsx
+import { Android } from "@/components/magicui/android";
+```
+
+```tsx
+<Android />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/animated-beam.mdx b/content/docs/components/animated-beam.mdx
index ccec78a9..47edf413 100644
--- a/content/docs/components/animated-beam.mdx
+++ b/content/docs/components/animated-beam.mdx
@@ -59,6 +59,16 @@ npx shadcn@canary add "https://magicui.design/r/animated-beam"
<ComponentPreview name="animated-beam-multiple-outputs" />
+## Usage
+
+```tsx
+import { AnimatedBeam } from "@/components/magicui/animated-beam.tsx";
+```
+
+```tsx
+<AnimatedBeam containerRef={containerRef} fromRef={fromRef} toRef={toRef} />
+```
+
## Props
### Animated Beam
diff --git a/content/docs/components/animated-circular-progress-bar.mdx b/content/docs/components/animated-circular-progress-bar.mdx
index 5abc7920..5c7d7cb2 100644
--- a/content/docs/components/animated-circular-progress-bar.mdx
+++ b/content/docs/components/animated-circular-progress-bar.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/animated-circular-progress-bar"
</Tabs>
+## Usage
+
+```tsx
+import { AnimatedCircularProgressBar } from "@/components/magicui/animated-circular-progress-bar";
+```
+
+```tsx
+<AnimatedCircularProgressBar />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/animated-gradient-text.mdx b/content/docs/components/animated-gradient-text.mdx
index 2fb5bbf8..3f55df5c 100644
--- a/content/docs/components/animated-gradient-text.mdx
+++ b/content/docs/components/animated-gradient-text.mdx
@@ -37,14 +37,16 @@ npx shadcn@canary add "https://magicui.design/r/animated-gradient-text"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
+Add the following animations to your global CSS file.
-```css
---animate-gradient: gradient 8s linear infinite;
+```css title="app/globals.css" {2, 4-8}
+@theme inline {
+ --animate-gradient: gradient 8s linear infinite;
-@keyframes gradient {
- to {
- background-position: var(--bg-size, 300%) 0;
+ @keyframes gradient {
+ to {
+ background-position: var(--bg-size, 300%) 0;
+ }
}
}
```
@@ -61,6 +63,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
<ComponentPreview name="animated-gradient-text-demo-2" />
+### Usage
+
+```tsx
+import { AnimatedGradientText } from "@/components/magicui/animated-gradient-text";
+```
+
+```tsx
+<AnimatedGradientText>Animated Gradient Text</AnimatedGradientText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/animated-grid-pattern.mdx b/content/docs/components/animated-grid-pattern.mdx
index 32ff3d54..6600ec0b 100644
--- a/content/docs/components/animated-grid-pattern.mdx
+++ b/content/docs/components/animated-grid-pattern.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/animated-grid-pattern"
</Tabs>
+## Usage
+
+```tsx
+import { AnimatedGridPattern } from "@/components/magicui/animated-grid-pattern";
+```
+
+```tsx
+<AnimatedGridPattern />
+```
+
## Props
### GridPattern
diff --git a/content/docs/components/animated-list.mdx b/content/docs/components/animated-list.mdx
index 6d4307d2..cca64f44 100644
--- a/content/docs/components/animated-list.mdx
+++ b/content/docs/components/animated-list.mdx
@@ -40,6 +40,20 @@ npx shadcn@canary add "https://magicui.design/r/animated-list"
</Tabs>
+## Usage
+
+```tsx
+import { AnimatedList } from "@/components/magicui/animated-list";
+```
+
+```tsx
+<AnimatedList>
+ <p>Item 1</p>
+ <p>Item 2</p>
+ <p>Item 3</p>
+</AnimatedList>
+```
+
## Props
### Animated List
diff --git a/content/docs/components/animated-shiny-text.mdx b/content/docs/components/animated-shiny-text.mdx
index c7931178..5077e4e1 100644
--- a/content/docs/components/animated-shiny-text.mdx
+++ b/content/docs/components/animated-shiny-text.mdx
@@ -37,20 +37,22 @@ npx shadcn@canary add "https://magicui.design/r/animated-shiny-text"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-shiny-text: shiny-text 8s infinite;
-
-@keyframes shiny-text {
- 0%,
- 90%,
- 100% {
- background-position: calc(-100% - var(--shiny-width)) 0;
- }
- 30%,
- 60% {
- background-position: calc(100% + var(--shiny-width)) 0;
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-14}
+@theme inline {
+ --animate-shiny-text: shiny-text 8s infinite;
+
+ @keyframes shiny-text {
+ 0%,
+ 90%,
+ 100% {
+ background-position: calc(-100% - var(--shiny-width)) 0;
+ }
+ 30%,
+ 60% {
+ background-position: calc(100% + var(--shiny-width)) 0;
+ }
}
}
```
@@ -61,6 +63,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { AnimatedShinyText } from "@/components/magicui/animated-shiny-text";
+```
+
+```tsx
+<AnimatedShinyText>Animated Shiny Text</AnimatedShinyText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/animated-subscribe-button.mdx b/content/docs/components/animated-subscribe-button.mdx
index a74ad290..548195b4 100644
--- a/content/docs/components/animated-subscribe-button.mdx
+++ b/content/docs/components/animated-subscribe-button.mdx
@@ -40,6 +40,19 @@ npx shadcn@canary add "https://magicui.design/r/animated-subscribe-button"
</Tabs>
+## Usage
+
+```tsx
+import { AnimatedSubscribeButton } from "@/components/magicui/animated-subscribe-button";
+```
+
+```tsx
+<AnimatedSubscribeButton>
+ <span>Follow</span>
+ <span>Subscribed</span>
+</AnimatedSubscribeButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/aurora-text.mdx b/content/docs/components/aurora-text.mdx
index c76ce98b..af2a3c94 100644
--- a/content/docs/components/aurora-text.mdx
+++ b/content/docs/components/aurora-text.mdx
@@ -36,31 +36,33 @@ npx shadcn@canary add "https://magicui.design/r/aurora-text"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-aurora: aurora 8s ease-in-out infinite alternate;
-
-@keyframes aurora {
- 0% {
- background-position: 0% 50%;
- transform: rotate(-5deg) scale(0.9);
- }
- 25% {
- background-position: 50% 100%;
- transform: rotate(5deg) scale(1.1);
- }
- 50% {
- background-position: 100% 50%;
- transform: rotate(-3deg) scale(0.95);
- }
- 75% {
- background-position: 50% 0%;
- transform: rotate(3deg) scale(1.05);
- }
- 100% {
- background-position: 0% 50%;
- transform: rotate(-5deg) scale(0.9);
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-25}
+@theme inline {
+ --animate-aurora: aurora 8s ease-in-out infinite alternate;
+
+ @keyframes aurora {
+ 0% {
+ background-position: 0% 50%;
+ transform: rotate(-5deg) scale(0.9);
+ }
+ 25% {
+ background-position: 50% 100%;
+ transform: rotate(5deg) scale(1.1);
+ }
+ 50% {
+ background-position: 100% 50%;
+ transform: rotate(-3deg) scale(0.95);
+ }
+ 75% {
+ background-position: 50% 0%;
+ transform: rotate(3deg) scale(1.05);
+ }
+ 100% {
+ background-position: 0% 50%;
+ transform: rotate(-5deg) scale(0.9);
+ }
}
}
```
@@ -71,6 +73,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { AuroraText } from "@/components/magicui/aurora-text";
+```
+
+```tsx
+<AuroraText>Aurora Text</AuroraText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/avatar-circles.mdx b/content/docs/components/avatar-circles.mdx
index 52d5259a..7c746c28 100644
--- a/content/docs/components/avatar-circles.mdx
+++ b/content/docs/components/avatar-circles.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/avatar-circles"
</Tabs>
+## Usage
+
+```tsx
+import { AvatarCircles } from "@/components/magicui/avatar-circles";
+```
+
+```tsx
+<AvatarCircles numPeople={99} avatarUrls={avatars} />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/bento-grid.mdx b/content/docs/components/bento-grid.mdx
index 1aa633de..05869981 100644
--- a/content/docs/components/bento-grid.mdx
+++ b/content/docs/components/bento-grid.mdx
@@ -43,3 +43,15 @@ npx shadcn@canary add "https://magicui.design/r/bento-grid"
## Examples
<ComponentPreview name="bento-demo-vertical" />
+
+## Usage
+
+```tsx
+import { BentoCard, BentoGrid } from "@/components/magicui/bento-grid";
+```
+
+```tsx
+<BentoGrid>
+ <BentoCard />
+</BentoGrid>
+```
diff --git a/content/docs/components/blur-fade.mdx b/content/docs/components/blur-fade.mdx
index 8b621977..3d6854b7 100644
--- a/content/docs/components/blur-fade.mdx
+++ b/content/docs/components/blur-fade.mdx
@@ -44,6 +44,20 @@ npx shadcn@canary add "https://magicui.design/r/blur-fade"
<ComponentPreview name="blur-fade-text-demo" />
+## Usage
+
+```tsx
+import { BlurFade } from "@/components/magicui/blur-fade";
+```
+
+```tsx
+<BlurFade>
+ <img src="https://picsum.photos/300/200?random=1" alt="Sample 1" />
+ <img src="https://picsum.photos/300/200?random=2" alt="Sample 2" />
+ <img src="https://picsum.photos/300/200?random=3" alt="Sample 3" />
+</BlurFade>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/border-beam.mdx b/content/docs/components/border-beam.mdx
index 18d06d02..107b92c8 100644
--- a/content/docs/components/border-beam.mdx
+++ b/content/docs/components/border-beam.mdx
@@ -60,7 +60,7 @@ import { BorderBeam } from "@/components/magicui/border-beam.tsx";
```
```tsx
-<div className="relative overflow-hidden">
+<div className="relative h-[500px] w-full overflow-hidden">
<BorderBeam />
</div>
```
diff --git a/content/docs/components/box-reveal.mdx b/content/docs/components/box-reveal.mdx
index c186baa6..73eeb1e4 100644
--- a/content/docs/components/box-reveal.mdx
+++ b/content/docs/components/box-reveal.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/box-reveal"
</Tabs>
+## Usage
+
+```tsx
+import { BoxReveal } from "@/components/magicui/box-reveal";
+```
+
+```tsx
+<BoxReveal>Box Reveal</BoxReveal>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/code-comparison.mdx b/content/docs/components/code-comparison.mdx
index 22dcb225..ec507f47 100644
--- a/content/docs/components/code-comparison.mdx
+++ b/content/docs/components/code-comparison.mdx
@@ -38,6 +38,16 @@ npx shadcn@canary add "https://magicui.design/r/code-comparison"
</Tabs>
+## Usage
+
+```tsx
+import { CodeComparison } from "@/components/magicui/code-comparison";
+```
+
+```tsx
+<CodeComparison beforeCode={beforeCode} afterCode={afterCode} />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/confetti.mdx b/content/docs/components/confetti.mdx
index 6ea96136..48bd895f 100644
--- a/content/docs/components/confetti.mdx
+++ b/content/docs/components/confetti.mdx
@@ -76,6 +76,16 @@ npm install canvas-confetti
<ComponentPreview name="confetti-emoji" />
+### Usage
+
+```tsx
+import { Confetti } from "@/components/magicui/confetti";
+```
+
+```tsx
+<Confetti />
+```
+
## Props
### Confetti
diff --git a/content/docs/components/cool-mode.mdx b/content/docs/components/cool-mode.mdx
index 86ffda77..4096eb75 100644
--- a/content/docs/components/cool-mode.mdx
+++ b/content/docs/components/cool-mode.mdx
@@ -46,6 +46,18 @@ npx shadcn@canary add "https://magicui.design/r/cool-mode"
<ComponentPreview name="cool-mode-custom" />
+### Usage
+
+```tsx
+import { CoolMode } from "@/components/magicui/cool-mode";
+```
+
+```tsx
+<CoolMode>
+ <button>Click me</button>
+</CoolMode>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/dock.mdx b/content/docs/components/dock.mdx
index 01538c38..336b23a4 100644
--- a/content/docs/components/dock.mdx
+++ b/content/docs/components/dock.mdx
@@ -51,6 +51,23 @@ npx shadcn@canary add "https://magicui.design/r/dock"
<ComponentPreview name="dock-demo-3" />
+## Usage
+
+```tsx
+import { Dock, DockIcon } from "@/components/magicui/dock";
+import { Home, Settings, Search } from "lucide-react";
+```
+
+```tsx
+<Dock>
+ <DockIcon>
+ <Home />
+ <Settings />
+ <Search />
+ </DockIcon>
+</Dock>
+```
+
## Props
### Dock
diff --git a/content/docs/components/dot-pattern.mdx b/content/docs/components/dot-pattern.mdx
index 80b36a0b..267548ad 100644
--- a/content/docs/components/dot-pattern.mdx
+++ b/content/docs/components/dot-pattern.mdx
@@ -51,6 +51,18 @@ npx shadcn@canary add "https://magicui.design/r/dot-pattern"
<ComponentPreview name="dot-pattern-with-glow-effect" />
+### Usage
+
+```tsx
+import { DotPattern } from "@/components/magicui/dot-pattern";
+```
+
+```tsx
+<div className="relative h-[500px] w-full overflow-hidden">
+ <DotPattern />
+</div>
+```
+
## Props
### Dot Pattern
diff --git a/content/docs/components/file-tree.mdx b/content/docs/components/file-tree.mdx
index 907a6b62..1f4f51a5 100644
--- a/content/docs/components/file-tree.mdx
+++ b/content/docs/components/file-tree.mdx
@@ -40,6 +40,23 @@ npx shadcn@canary add "https://magicui.design/r/file-tree"
</Tabs>
+## Usage
+
+```tsx
+import { File, Folder, Tree } from "@/components/magicui/file-tree";
+```
+
+```tsx
+<Tree>
+ <Folder>
+ <Folder>
+ <File>layout.tsx</File>
+ <File>page.tsx</File>
+ </Folder>
+ </Folder>
+</Tree>
+```
+
## Props
### Tree
diff --git a/content/docs/components/flickering-grid.mdx b/content/docs/components/flickering-grid.mdx
index 6536c8dd..a8140f7b 100644
--- a/content/docs/components/flickering-grid.mdx
+++ b/content/docs/components/flickering-grid.mdx
@@ -46,6 +46,16 @@ npx shadcn@canary add "https://magicui.design/r/flickering-grid"
<ComponentPreview name="flickering-grid-rounded-demo" />
+### Usage
+
+```tsx
+import { FlickeringGrid } from "@/components/magicui/flickering-grid";
+```
+
+```tsx
+<FlickeringGrid />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/flip-text.mdx b/content/docs/components/flip-text.mdx
index 50d2e997..496edb58 100644
--- a/content/docs/components/flip-text.mdx
+++ b/content/docs/components/flip-text.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/flip-text"
</Tabs>
+## Usage
+
+```tsx
+import { FlipText } from "@/components/magicui/flip-text";
+```
+
+```tsx
+<FlipText>Flip Text</FlipText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/globe.mdx b/content/docs/components/globe.mdx
index d322e9e7..3dd37b0c 100644
--- a/content/docs/components/globe.mdx
+++ b/content/docs/components/globe.mdx
@@ -47,6 +47,16 @@ npm install cobe
</Tabs>
+## Usage
+
+```tsx
+import { Globe } from "@/components/magicui/globe";
+```
+
+```tsx
+<Globe />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/grid-pattern.mdx b/content/docs/components/grid-pattern.mdx
index 664ac9eb..2ef90d56 100644
--- a/content/docs/components/grid-pattern.mdx
+++ b/content/docs/components/grid-pattern.mdx
@@ -51,6 +51,18 @@ npx shadcn@canary add "https://magicui.design/r/grid-pattern"
<ComponentPreview name="grid-pattern-dashed" />
+### Usage
+
+```tsx
+import { GridPattern } from "@/components/magicui/grid-pattern";
+```
+
+```tsx
+<div className="relative h-[500px] w-full overflow-hidden">
+ <GridPattern />
+</div>
+```
+
## Props
### GridPattern
diff --git a/content/docs/components/hero-video-dialog.mdx b/content/docs/components/hero-video-dialog.mdx
index bda053e3..641b8ad7 100644
--- a/content/docs/components/hero-video-dialog.mdx
+++ b/content/docs/components/hero-video-dialog.mdx
@@ -46,6 +46,22 @@ npx shadcn@canary add "https://magicui.design/r/hero-video-dialog"
<ComponentPreview name="hero-video-dialog-demo-top-in-bottom-out" />
+## Usage
+
+```tsx
+import { HeroVideoDialog } from "@/components/magicui/hero-video-dialog";
+```
+
+```tsx
+<HeroVideoDialog
+ className="block dark:hidden"
+ animationStyle="from-center"
+ videoSrc="https://www.example.com/dummy-video"
+ thumbnailSrc="https://www.example.com/dummy-thumbnail.png"
+ thumbnailAlt="Dummy Video Thumbnail"
+/>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/hyper-text.mdx b/content/docs/components/hyper-text.mdx
index 1046a033..8ca15772 100644
--- a/content/docs/components/hyper-text.mdx
+++ b/content/docs/components/hyper-text.mdx
@@ -46,6 +46,16 @@ npm install motion
</Tabs>
+## Usage
+
+```tsx
+import { HyperText } from "@/components/magicui/hyper-text";
+```
+
+```tsx
+<HyperText>Hover me</HyperText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/icon-cloud.mdx b/content/docs/components/icon-cloud.mdx
index aa0ac6d9..49cd7ee4 100644
--- a/content/docs/components/icon-cloud.mdx
+++ b/content/docs/components/icon-cloud.mdx
@@ -46,6 +46,18 @@ npx shadcn@canary add "https://magicui.design/r/icon-cloud"
<ComponentPreview name="icon-cloud-demo-3" />
+## Usage
+
+```tsx
+import { IconCloud } from "@/components/magicui/icon-cloud";
+```
+
+```tsx
+<div className="relative overflow-hidden">
+ <IconCloud images={images} />
+</div>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/interactive-grid-pattern.mdx b/content/docs/components/interactive-grid-pattern.mdx
index 6dba0f7f..90c86976 100644
--- a/content/docs/components/interactive-grid-pattern.mdx
+++ b/content/docs/components/interactive-grid-pattern.mdx
@@ -46,6 +46,18 @@ npx shadcn@canary add "https://magicui.design/r/interactive-grid-pattern"
<ComponentPreview name="interactive-grid-pattern-demo-2" />
+### Usage
+
+```tsx
+import { InteractiveGridPattern } from "@/components/magicui/interactive-grid-pattern";
+```
+
+```tsx
+<div className="relative h-[500px] w-full overflow-hidden">
+ <InteractiveGridPattern />
+</div>
+```
+
## Props
| Prop | Type | Description | Default |
diff --git a/content/docs/components/interactive-hover-button.mdx b/content/docs/components/interactive-hover-button.mdx
index 63cd13b0..267716c4 100644
--- a/content/docs/components/interactive-hover-button.mdx
+++ b/content/docs/components/interactive-hover-button.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/interactive-hover-button"
</Tabs>
+## Usage
+
+```tsx
+import { InteractiveHoverButton } from "@/components/magicui/interactive-hover-button";
+```
+
+```tsx
+<InteractiveHoverButton>Interactive Hover Button</InteractiveHoverButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/iphone-15-pro.mdx b/content/docs/components/iphone-15-pro.mdx
index a3130984..5676d036 100644
--- a/content/docs/components/iphone-15-pro.mdx
+++ b/content/docs/components/iphone-15-pro.mdx
@@ -50,6 +50,16 @@ npx shadcn@canary add "https://magicui.design/r/iphone-15-pro"
<ComponentPreview name="iphone-15-pro-demo-3" />
+## Usage
+
+```tsx
+import { Iphone15Pro } from "@/components/magicui/iphone-15-pro";
+```
+
+```tsx
+<Iphone15Pro />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/lens.mdx b/content/docs/components/lens.mdx
index 9db387eb..123141dd 100644
--- a/content/docs/components/lens.mdx
+++ b/content/docs/components/lens.mdx
@@ -50,6 +50,18 @@ npx shadcn@canary add "https://magicui.design/r/lens"
<ComponentPreview name="lens-demo-3" />
+## Usage
+
+```tsx
+import { Lens } from "@/components/magicui/lens";
+```
+
+```tsx
+<Lens>
+ <img src="/images/lens-demo.jpg" alt="Lens Demo" />
+</Lens>
+```
+
## Props
| Property | Type | Default | Description |
diff --git a/content/docs/components/line-shadow-text.mdx b/content/docs/components/line-shadow-text.mdx
index 48b82658..735375b9 100644
--- a/content/docs/components/line-shadow-text.mdx
+++ b/content/docs/components/line-shadow-text.mdx
@@ -36,17 +36,19 @@ npx shadcn@canary add "https://magicui.design/r/line-shadow-text"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-line-shadow: line-shadow 15s linear infinite;
-
-@keyframes line-shadow {
- 0% {
- background-position: 0 0;
- }
- 100% {
- background-position: 100% -100%;
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 5-12}
+@theme inline {
+ --animate-line-shadow: line-shadow 15s linear infinite;
+
+ @keyframes line-shadow {
+ 0% {
+ background-position: 0 0;
+ }
+ 100% {
+ background-position: 100% -100%;
+ }
}
}
```
@@ -57,6 +59,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { LineShadowText } from "@/components/magicui/line-shadow-text";
+```
+
+```tsx
+<LineShadowText>Magic UI</LineShadowText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/magic-card.mdx b/content/docs/components/magic-card.mdx
index 390c0837..66dcaf6d 100644
--- a/content/docs/components/magic-card.mdx
+++ b/content/docs/components/magic-card.mdx
@@ -47,7 +47,12 @@ import { MagicCard } from "@/registry/magicui/magic-card";
```
```tsx
-<MagicCard>Hello World</MagicCard>
+<MagicCard>
+ <div className="p-4">
+ <p>Hello World</p>
+ <span>Hover me</span>
+ </div>
+</MagicCard>
```
## Props
diff --git a/content/docs/components/marquee.mdx b/content/docs/components/marquee.mdx
index cb6b29a9..067441f7 100644
--- a/content/docs/components/marquee.mdx
+++ b/content/docs/components/marquee.mdx
@@ -77,6 +77,21 @@ Add the following animations to your global CSS file inside the `@theme inline`
<ComponentPreview name="marquee-3d" />
+## Usage
+
+```tsx
+import { Marquee } from "@/components/magicui/marquee.tsx";
+```
+
+```tsx
+<Marquee>
+ <span>Next.js</span>
+ <span>React</span>
+ <span>TypeScript</span>
+ <span>Tailwind CSS</span>
+</Marquee>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/meteors.mdx b/content/docs/components/meteors.mdx
index e9e152a0..df289d74 100644
--- a/content/docs/components/meteors.mdx
+++ b/content/docs/components/meteors.mdx
@@ -37,22 +37,24 @@ npx shadcn@canary add "https://magicui.design/r/meteors"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-meteor: meteor 5s linear infinite;
-
-@keyframes meteor {
- 0% {
- transform: rotate(var(--angle)) translateX(0);
- opacity: 1;
- }
- 70% {
- opacity: 1;
- }
- 100% {
- transform: rotate(var(--angle)) translateX(-500px);
- opacity: 0;
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-15}
+@theme inline {
+ --animate-meteor: meteor 5s linear infinite;
+
+ @keyframes meteor {
+ 0% {
+ transform: rotate(var(--angle)) translateX(0);
+ opacity: 1;
+ }
+ 70% {
+ opacity: 1;
+ }
+ 100% {
+ transform: rotate(var(--angle)) translateX(-500px);
+ opacity: 0;
+ }
}
}
```
@@ -63,6 +65,18 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { Meteors } from "@/components/magicui/meteors";
+```
+
+```tsx
+<div className="relative overflow-hidden h-[500px] w-full max-w-[350px]">
+ <Meteors />
+</div>
+```
+
## Props
### Meteors
diff --git a/content/docs/components/morphing-text.mdx b/content/docs/components/morphing-text.mdx
index 245cfa30..bdfd5f91 100644
--- a/content/docs/components/morphing-text.mdx
+++ b/content/docs/components/morphing-text.mdx
@@ -38,6 +38,16 @@ npx shadcn@canary add "https://magicui.design/r/morphing-text"
</Tabs>
+## Usage
+
+```tsx
+import { MorphingText } from "@/components/magicui/morphing-text";
+```
+
+```tsx
+<MorphingText texts={["Hello", "World"]} />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/neon-gradient-card.mdx b/content/docs/components/neon-gradient-card.mdx
index ed97b366..6e7f0b7f 100644
--- a/content/docs/components/neon-gradient-card.mdx
+++ b/content/docs/components/neon-gradient-card.mdx
@@ -36,18 +36,20 @@ npx shadcn@canary add "https://magicui.design/r/neon-gradient-card"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-background-position-spin: background-position-spin 3000ms infinite
- alternate;
-
-@keyframes background-position-spin {
- 0% {
- background-position: top center;
- }
- 100% {
- background-position: bottom center;
+Add the following animations to your global CSS file .
+
+```css title="app/globals.css" {2-3, 5-12}
+@theme inline {
+ --animate-background-position-spin: background-position-spin 3000ms infinite
+ alternate;
+
+ @keyframes background-position-spin {
+ 0% {
+ background-position: top center;
+ }
+ 100% {
+ background-position: bottom center;
+ }
}
}
```
@@ -58,6 +60,21 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { NeonGradientCard } from "@/components/magicui/neon-gradient-card";
+```
+
+```tsx
+<NeonGradientCard>
+ <div className="p-4">
+ <p>Hello</p>
+ <span>Hover me</span>
+ </div>
+</NeonGradientCard>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/number-ticker.mdx b/content/docs/components/number-ticker.mdx
index a34f1609..62b44c91 100644
--- a/content/docs/components/number-ticker.mdx
+++ b/content/docs/components/number-ticker.mdx
@@ -51,6 +51,16 @@ npx shadcn@canary add "https://magicui.design/r/number-ticker"
<ComponentPreview name="number-ticker-demo-2" />
+### Usage
+
+```tsx
+import { NumberTicker } from "@/components/magicui/number-ticker";
+```
+
+```tsx
+<NumberTicker value={100} />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/orbiting-circles.mdx b/content/docs/components/orbiting-circles.mdx
index cd653312..29a2e164 100644
--- a/content/docs/components/orbiting-circles.mdx
+++ b/content/docs/components/orbiting-circles.mdx
@@ -37,20 +37,22 @@ npx shadcn@canary add "https://magicui.design/r/orbiting-circles"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-orbit: orbit calc(var(--duration) * 1s) linear infinite;
-
-@keyframes orbit {
- 0% {
- transform: rotate(calc(var(--angle) * 1deg))
- translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg));
- }
- 100% {
- transform: rotate(calc(var(--angle) * 1deg + 360deg))
- translateY(calc(var(--radius) * 1px))
- rotate(calc((var(--angle) * -1deg) - 360deg));
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-14}
+@theme inline {
+ --animate-orbit: orbit calc(var(--duration) * 1s) linear infinite;
+
+ @keyframes orbit {
+ 0% {
+ transform: rotate(calc(var(--angle) * 1deg))
+ translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg));
+ }
+ 100% {
+ transform: rotate(calc(var(--angle) * 1deg + 360deg))
+ translateY(calc(var(--radius) * 1px))
+ rotate(calc((var(--angle) * -1deg) - 360deg));
+ }
}
}
```
@@ -61,6 +63,29 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { OrbitingCircles } from "@/components/magicui/orbiting-circles";
+import { File, Settings, Search } from "lucide-react";
+```
+
+```tsx
+<div className="relative overflow-hidden h-[500px] w-full">
+ <OrbitingCircles>
+ <File />
+ <Settings />
+ <File />
+ </OrbitingCircles>
+ <OrbitingCircles radius={100} reverse>
+ <File />
+ <Settings />
+ <File />
+ <Search />
+ </OrbitingCircles>
+</div>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/particles.mdx b/content/docs/components/particles.mdx
index 6a069e1d..bb744b54 100644
--- a/content/docs/components/particles.mdx
+++ b/content/docs/components/particles.mdx
@@ -40,6 +40,18 @@ npx shadcn@canary add "https://magicui.design/r/particles"
</Tabs>
+## Usage
+
+```tsx
+import { Particles } from "@/components/magicui/particles";
+```
+
+```tsx
+<div className="relative overflow-hidden h-[500px] w-full">
+ <Particle />
+</div>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/pulsating-button.mdx b/content/docs/components/pulsating-button.mdx
index 3d686e13..96b03a43 100644
--- a/content/docs/components/pulsating-button.mdx
+++ b/content/docs/components/pulsating-button.mdx
@@ -36,18 +36,20 @@ npx shadcn@canary add "https://magicui.design/r/pulsating-button"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-pulse: pulse var(--duration) ease-out infinite;
-
-@keyframes pulse {
- 0%,
- 100% {
- box-shadow: 0 0 0 0 var(--pulse-color);
- }
- 50% {
- box-shadow: 0 0 0 8px var(--pulse-color);
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-12}
+@theme inline {
+ --animate-pulse: pulse var(--duration) ease-out infinite;
+
+ @keyframes pulse {
+ 0%,
+ 100% {
+ box-shadow: 0 0 0 0 var(--pulse-color);
+ }
+ 50% {
+ box-shadow: 0 0 0 8px var(--pulse-color);
+ }
}
}
```
@@ -58,6 +60,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { PulsatingButton } from "@/components/magicui/pulsating-button";
+```
+
+```tsx
+<PulsatingButton>Pulsating Button</PulsatingButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/rainbow-button.mdx b/content/docs/components/rainbow-button.mdx
index e5acea85..c87c98e4 100644
--- a/content/docs/components/rainbow-button.mdx
+++ b/content/docs/components/rainbow-button.mdx
@@ -38,7 +38,7 @@ npx shadcn@canary add "https://magicui.design/r/rainbow-button"
Add the following to your `globals.css` file:
-```css
+```css title="app/globals.css" {2-6}
:root {
--color-1: 0 100% 63%;
--color-2: 270 100% 63%;
@@ -50,17 +50,19 @@ Add the following to your `globals.css` file:
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
+Add the following animations to your global CSS file.
-```css
---animate-rainbow: rainbow var(--speed, 2s) infinite linear;
+```css title="app/globals.css" {2, 4-11}
+@theme inline {
+ --animate-rainbow: rainbow var(--speed, 2s) infinite linear;
-@keyframes rainbow {
- 0% {
- background-position: 0%;
- }
- 100% {
- background-position: 200%;
+ @keyframes rainbow {
+ 0% {
+ background-position: 0%;
+ }
+ 100% {
+ background-position: 200%;
+ }
}
}
```
@@ -71,6 +73,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { RainbowButton } from "@/components/magicui/rainbow-button";
+```
+
+```tsx
+<RainbowButton>Rainbow Button</RainbowButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/retro-grid.mdx b/content/docs/components/retro-grid.mdx
index bf11be1c..a17ae2f7 100644
--- a/content/docs/components/retro-grid.mdx
+++ b/content/docs/components/retro-grid.mdx
@@ -37,17 +37,19 @@ npx shadcn@canary add "https://magicui.design/r/retro-grid"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-grid: grid 15s linear infinite;
-
-@keyframes grid {
- 0% {
- transform: translateY(-50%);
- }
- 100% {
- transform: translateY(0);
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-11}
+@theme inline {
+ --animate-grid: grid 15s linear infinite;
+
+ @keyframes grid {
+ 0% {
+ transform: translateY(-50%);
+ }
+ 100% {
+ transform: translateY(0);
+ }
}
}
```
@@ -58,6 +60,18 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { RetroGrid } from "@/components/magicui/retro-grid";
+```
+
+```tsx
+<div className="relative h-[500px] w-full overflow-hidden">
+ <RetroGrid />
+</div>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/ripple-button.mdx b/content/docs/components/ripple-button.mdx
index 37581a61..509282da 100644
--- a/content/docs/components/ripple-button.mdx
+++ b/content/docs/components/ripple-button.mdx
@@ -36,18 +36,20 @@ npx shadcn@canary add "https://magicui.design/r/ripple-button"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-rippling: rippling var(--duration) ease-out;
-
-@keyframes rippling {
- 0% {
- opacity: 1;
- }
- 100% {
- transform: scale(2);
- opacity: 0;
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-12}
+@theme inline {
+ --animate-rippling: rippling var(--duration) ease-out;
+
+ @keyframes rippling {
+ 0% {
+ opacity: 1;
+ }
+ 100% {
+ transform: scale(2);
+ opacity: 0;
+ }
}
}
```
@@ -58,6 +60,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { RippleButton } from "@/components/magicui/ripple-button";
+```
+
+```tsx
+<RippleButton>Ripple Button</RippleButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/ripple.mdx b/content/docs/components/ripple.mdx
index 198d76b1..7328ef33 100644
--- a/content/docs/components/ripple.mdx
+++ b/content/docs/components/ripple.mdx
@@ -37,19 +37,21 @@ npx shadcn@canary add "https://magicui.design/r/ripple"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-ripple: ripple var(--duration, 2s) ease calc(var(--i, 0) * 0.2s)
- infinite;
-
-@keyframes ripple {
- 0%,
- 100% {
- transform: translate(-50%, -50%) scale(1);
- }
- 50% {
- transform: translate(-50%, -50%) scale(0.9);
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2-3, 5-13}
+@theme inline {
+ --animate-ripple: ripple var(--duration, 2s) ease calc(var(--i, 0) * 0.2s)
+ infinite;
+
+ @keyframes ripple {
+ 0%,
+ 100% {
+ transform: translate(-50%, -50%) scale(1);
+ }
+ 50% {
+ transform: translate(-50%, -50%) scale(0.9);
+ }
}
}
```
@@ -60,6 +62,18 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { Ripple } from "@/components/magicui/ripple";
+```
+
+```tsx
+<div className="relative h-[500px] w-full overflow-hidden">
+ <Ripple />
+</div>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/safari.mdx b/content/docs/components/safari.mdx
index 566c569c..3cb6bfaf 100644
--- a/content/docs/components/safari.mdx
+++ b/content/docs/components/safari.mdx
@@ -54,6 +54,16 @@ npx shadcn@canary add "https://magicui.design/r/safari"
<ComponentPreview name="safari-demo-4" />
+## Usage
+
+```tsx
+import { Safari } from "@/components/magicui/safari";
+```
+
+```tsx
+<Safari url="https://magicui.design" />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/scratch-to-reveal.mdx b/content/docs/components/scratch-to-reveal.mdx
index e8e087f9..66f508bf 100644
--- a/content/docs/components/scratch-to-reveal.mdx
+++ b/content/docs/components/scratch-to-reveal.mdx
@@ -38,6 +38,18 @@ npx shadcn@canary add "https://magicui.design/r/scratch-to-reveal"
</Tabs>
+## Usage
+
+```tsx
+import { ScratchToReveal } from "@/components/magicui/scratch-to-reveal";
+```
+
+```tsx
+<ScratchToReveal width={300} height={300} minScratchPercentage={50}>
+ Scratch To Reveal
+</ScratchToReveal>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/script-copy-btn.mdx b/content/docs/components/script-copy-btn.mdx
index a7f505db..c980a2c8 100644
--- a/content/docs/components/script-copy-btn.mdx
+++ b/content/docs/components/script-copy-btn.mdx
@@ -38,6 +38,16 @@ npx shadcn@canary add "https://magicui.design/r/script-copy-btn"
</Tabs>
+## Usage
+
+```tsx
+import { ScriptCopyBtn } from "@/components/magicui/script-copy-btn";
+```
+
+```tsx
+<ScriptCopyBtn />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/scroll-based-velocity.mdx b/content/docs/components/scroll-based-velocity.mdx
index 7019391a..d605758d 100644
--- a/content/docs/components/scroll-based-velocity.mdx
+++ b/content/docs/components/scroll-based-velocity.mdx
@@ -46,6 +46,16 @@ npm install motion
</Tabs>
+## Usage
+
+```tsx
+import { VelocityScroll } from "@/components/magicui/scroll-based-velocity";
+```
+
+```tsx
+<VelocityScroll>Scroll Based Velocity</VelocityScroll>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/scroll-progress.mdx b/content/docs/components/scroll-progress.mdx
index 1a6474c1..8ea8cdd2 100644
--- a/content/docs/components/scroll-progress.mdx
+++ b/content/docs/components/scroll-progress.mdx
@@ -37,6 +37,16 @@ npx shadcn@canary add "https://magicui.design/r/scroll-progress"
</Tabs>
+## Usage
+
+```tsx
+import { ScrollProgress } from "@/components/magicui/scroll-progress";
+```
+
+```tsx
+<ScrollProgress />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/shimmer-button.mdx b/content/docs/components/shimmer-button.mdx
index b374623e..243cd690 100644
--- a/content/docs/components/shimmer-button.mdx
+++ b/content/docs/components/shimmer-button.mdx
@@ -37,32 +37,34 @@ npx shadcn@canary add "https://magicui.design/r/shimmer-button"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-shimmer-slide: shimmer-slide var(--speed) ease-in-out infinite
- alternate;
---animate-spin-around: spin-around calc(var(--speed) * 2) infinite linear;
-
-@keyframes shimmer-slide {
- to {
- transform: translate(calc(100cqw - 100%), 0);
- }
-}
-@keyframes spin-around {
- 0% {
- transform: translateZ(0) rotate(0);
- }
- 15%,
- 35% {
- transform: translateZ(0) rotate(90deg);
- }
- 65%,
- 85% {
- transform: translateZ(0) rotate(270deg);
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2-4, 6-26}
+@theme inline {
+ --animate-shimmer-slide: shimmer-slide var(--speed) ease-in-out infinite
+ alternate;
+ --animate-spin-around: spin-around calc(var(--speed) * 2) infinite linear;
+
+ @keyframes shimmer-slide {
+ to {
+ transform: translate(calc(100cqw - 100%), 0);
+ }
}
- 100% {
- transform: translateZ(0) rotate(360deg);
+ @keyframes spin-around {
+ 0% {
+ transform: translateZ(0) rotate(0);
+ }
+ 15%,
+ 35% {
+ transform: translateZ(0) rotate(90deg);
+ }
+ 65%,
+ 85% {
+ transform: translateZ(0) rotate(270deg);
+ }
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
}
}
```
@@ -73,6 +75,16 @@ Add the following animations to your global CSS file inside the `@theme inline`
</Tabs>
+## Usage
+
+```tsx
+import { ShimmerButton } from "@/components/magicui/shimmer-button";
+```
+
+```tsx
+<ShimmerButton>Shimmer Button</ShimmerButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/shine-border.mdx b/content/docs/components/shine-border.mdx
index e66008c3..df4ac328 100644
--- a/content/docs/components/shine-border.mdx
+++ b/content/docs/components/shine-border.mdx
@@ -36,20 +36,22 @@ npx shadcn@canary add "https://magicui.design/r/shine-border"
<Step>Add the required CSS animations</Step>
-Add the following animations to your global CSS file inside the `@theme inline` block (e.g., `app/globals.css` or similar):
-
-```css
---animate-shine: shine var(--duration) infinite linear;
-
-@keyframes shine {
- 0% {
- background-position: 0% 0%;
- }
- 50% {
- background-position: 100% 100%;
- }
- to {
- background-position: 0% 0%;
+Add the following animations to your global CSS file.
+
+```css title="app/globals.css" {2, 4-14}
+@theme inline {
+ --animate-shine: shine var(--duration) infinite linear;
+
+ @keyframes shine {
+ 0% {
+ background-position: 0% 0%;
+ }
+ 50% {
+ background-position: 100% 100%;
+ }
+ to {
+ background-position: 0% 0%;
+ }
}
}
```
@@ -73,7 +75,7 @@ import { ShineBorder } from "@/registry/magicui/shine-border";
```
```tsx
-<div className="relative overflow-hidden">
+<div className="relative h-[500px] w-full overflow-hidden">
<ShineBorder />
</div>
```
diff --git a/content/docs/components/shiny-button.mdx b/content/docs/components/shiny-button.mdx
index 2babae9c..b75ec8d4 100644
--- a/content/docs/components/shiny-button.mdx
+++ b/content/docs/components/shiny-button.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/shiny-button"
</Tabs>
+## Usage
+
+```tsx
+import { ShinyButton } from "@/components/magicui/shiny-button";
+```
+
+```tsx
+<ShinyButton>Shiny Button</ShinyButton>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/sparkles-text.mdx b/content/docs/components/sparkles-text.mdx
index 4d0c0b70..3c2edb09 100644
--- a/content/docs/components/sparkles-text.mdx
+++ b/content/docs/components/sparkles-text.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/sparkles-text"
</Tabs>
+## Usage
+
+```tsx
+import { SparklesText } from "@/components/magicui/sparkles-text";
+```
+
+```tsx
+<SparklesText text="Sparkles Text" />
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/spinning-text.mdx b/content/docs/components/spinning-text.mdx
index 1aec4069..1e44d8ba 100644
--- a/content/docs/components/spinning-text.mdx
+++ b/content/docs/components/spinning-text.mdx
@@ -47,6 +47,16 @@ npx shadcn@canary add "https://magicui.design/r/spinning-text"
<ComponentPreview name="spinning-text-demo-2" />
+### Usage
+
+```tsx
+import { SpinningText } from "@/components/magicui/spinning-text";
+```
+
+```tsx
+<SpinningText>learn more • earn more • grow more •</SpinningText>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/terminal.mdx b/content/docs/components/terminal.mdx
index 8147f01a..ad7a00fb 100644
--- a/content/docs/components/terminal.mdx
+++ b/content/docs/components/terminal.mdx
@@ -38,6 +38,25 @@ npx shadcn@canary add "https://magicui.design/r/terminal"
</Tabs>
+## Usage
+
+```tsx
+import {
+ AnimatedSpan,
+ Terminal,
+ TypingAnimation,
+} from "@/components/magicui/terminal";
+```
+
+```tsx
+<Terminal>
+ <TypingAnimation>
+ <AnimatedSpan>Hello, world!</AnimatedSpan>
+ <TypingAnimation>MagicUI is awesome!</TypingAnimation>
+ </TypingAnimation>
+</Terminal>
+```
+
## Props
### Terminal
diff --git a/content/docs/components/text-animate.mdx b/content/docs/components/text-animate.mdx
index cffc3693..aef8aecb 100644
--- a/content/docs/components/text-animate.mdx
+++ b/content/docs/components/text-animate.mdx
@@ -74,6 +74,18 @@ npx shadcn@canary add "https://magicui.design/r/text-animate"
<ComponentPreview name="text-animate-demo-9" />
+## Usage
+
+```tsx
+import { TextAnimate } from "@/components/magicui/text-animate";
+```
+
+```tsx
+<TextAnimate animation="blurInUp" by="word">
+ Blur in by word
+</TextAnimate>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/typing-animation.mdx b/content/docs/components/typing-animation.mdx
index f94a0aee..6e5bce99 100644
--- a/content/docs/components/typing-animation.mdx
+++ b/content/docs/components/typing-animation.mdx
@@ -40,6 +40,16 @@ npx shadcn@canary add "https://magicui.design/r/typing-animation"
</Tabs>
+## Usage
+
+```tsx
+import { TypingAnimation } from "@/components/magicui/typing-animation";
+```
+
+```tsx
+<TypingAnimation>Typing Animation</TypingAnimation>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/warp-background.mdx b/content/docs/components/warp-background.mdx
index 3a490446..44434162 100644
--- a/content/docs/components/warp-background.mdx
+++ b/content/docs/components/warp-background.mdx
@@ -40,6 +40,21 @@ npx shadcn@canary add "https://magicui.design/r/warp-background"
</Tabs>
+## Usage
+
+```tsx
+import { WarpBackground } from "@/components/magicui/warp-background";
+```
+
+```tsx
+<WarpBackground>
+ <div className="w-80">
+ <p>Warp Background</p>
+ <p>This is a component that creates a warp background effect.</p>
+ </div>
+</WarpBackground>
+```
+
## Props
| Prop | Type | Default | Description |
diff --git a/content/docs/components/word-rotate.mdx b/content/docs/components/word-rotate.mdx
index 5a3bcf7a..dc235487 100644
--- a/content/docs/components/word-rotate.mdx
+++ b/content/docs/components/word-rotate.mdx
@@ -46,6 +46,16 @@ npm install motion
</Tabs>
+## Usage
+
+```tsx
+import { WordRotate } from "@/components/magicui/word-rotate";
+```
+
+```tsx
+<WordRotate words={["Word", "Rotate"]} />
+```
+
## Props
| Prop | Type | Default | Description |