Introducing Aceternity UI Pro - 70+ premium component packs and templates to build amazing websites.
Logo

Spotlight

A spotlight effect with Tailwind CSS, good for drawing attention to a particular element on the page.

Open in

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/spotlight

Update your CSS configuration

app/globals.css
@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 nameTypeDescription
classNamestringThe class name of the spotlight component.
fillstringHex 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

Aceternity UI Pro Demo - Light Mode
A product by Aceternity
Building in public at @mannupaaji