Spotlight
A spotlight effect with Tailwind CSS, good for drawing attention to a particular element on the page.
Installation
Run the following command
npx shadcn@latest add @aceternity/spotlight
Update 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
70+ templates and component blocks combined
Ready to copy paste component blocks, save days of development time

