Spotlight
A spotlight effect with Tailwind CSS, good for drawing attention to a particular element on the page.
Spotlight
is the new trend.
Spotlight effect is a great way to draw attention to a specific part of the page. Here, we are drawing the attention towards the text section of the page. I don't know why but I'm running out of copy.
Installation
Run the following command
npx shadcn@latest add @aceternity/spotlightUpdate your CSS configuration
@import "tailwindcss";
@theme inline {
--animate-spotlight: spotlight 2s ease 0.75s 1 forwards;
}
@keyframes spotlight {
0% {
opacity: 0;
transform: translate(-72%, -62%) scale(0.5);
}
100% {
opacity: 1;
transform: translate(-50%, -40%) scale(1);
}
}Props
| Prop name | Type | Description |
|---|---|---|
className | string | The class name of the spotlight component. |
fill | string | Hex color for the spotlight fill. |
This component is inspired from TypeHero's landing page
Build websites faster and 10x better than your competitors with
Aceternity UI Pro
Next.js 15, Tailwind CSS v4 and Motion for react powered templates
200+ templates and blocks combined
Ready to copy paste component blocks, save days of development time

