Docs
Shimmer Text
Shimmer Text
A text component with a subtle animated shimmer effect.
#GoDreamEndless possibilities powered by AI
Made with 🧡 by Breeze
Installation
Install the following dependencies:
npm install framer-motion clsx tailwind-mergeAdd the utils.ts file to the @/lib folder
Create a shimmer-text.tsx file and copy the below code.
In globals.css copy the below code.
.linear-mask {
mask-image: linear-gradient(
-75deg,
white calc(var(--x) + 20%),
transparent calc(var(--x) + 30%),
white calc(var(--x) + 100%)
);
-webkit-mask-image: linear-gradient(
-75deg,
white calc(var(--x) + 20%),
transparent calc(var(--x) + 30%),
white calc(var(--x) + 100%)
);
}Update the import paths to match your project setup.
Usage
import { ShimmerText } from "@/components/breezeblocks/shimmer-text";<ShimmerText className="text-4xl font-bold text-black">Some Text</ShimmerText>Props
| Prop | Type | Description | Default |
|---|---|---|---|
| children | React.ReactNode | The textual content | - |
| className | string | Additional custom classes | - |