Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Tracing Spotlight Panel, animated React component

A panel with a light in it: point inside and a soft spotlight trails the pointer on a spring while the border glows wherever the light is closest. Leave and the light slides out to the edge and keeps running laps around the border, tracing the outline until you come back.

  • Free
  • Motion Effects
  • Hover
  • Spring
  • Glow

Like Tracing Spotlight Panel? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Tracing Spotlight Panel stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Pro

Most popular

$24per month

  • Unlimited projects
  • Version history for 90 days
  • Priority support

Props

PropTypeDefaultWhat it does
children—Panel content. Leave out for the built-in pricing tier.
color—Colour of the light. Defaults to system blue.
size260Radius of the spotlight inside the panel, in px.
tracetrueWhile nobody is pointing at it, the light runs laps around the border.
lap5Seconds for one lap of the border.
autoplayfalseSweeps the spotlight through the panel now and then until someone points at it.
className—Classes for the root (it is 340px wide at most).

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/tracing-spotlight-panel
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    tracing-spotlight-panel/
    index.ts
    tracing-spotlight-panel.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { TracingSpotlightPanel } from "@/components/tracing-spotlight-panel";
    
    export default function Page() {
      return (
        <main>
          <TracingSpotlightPanel />
        </main>
      );
    }

Like Tracing Spotlight Panel? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Tracing Spotlight Panel stays free.

About Tracing Spotlight Panel

The Tracing Spotlight Panel adds a cursor-tracked highlight gradient to any panel or card. As the cursor moves over the surface, a spotlight gradient repositions with spring-smoothed motion, creating the impression of a light source following the cursor. The effect is applied via an overlay that composites above the panel background without affecting child content layout. Use it on pricing tiers, feature cards, or testimonial panels to increase hover engagement.

Good for

  • Pricing plan card hover effects
  • Feature highlight panel interactions
  • Testimonial and quote card styling
  • Interactive product screenshot frames

Guides