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 https://ui.aceternity.com/registry/spotlight.json

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

With the best in class components and templates, stand out from the crowd and get more attention to your website. Trusted by founders and entrepreneurs from all over the world.

Go Pro
This service exceeded our expectations, since not only was the development technically flawless, but Manu and his team also acted as strategic partners by encouraging us to add ...

Georg Weingartner

CMO at Renderwork

A product by Aceternity
Building in public at @mannupaaji