Search

Search components and flows across the catalog

ThatDesignUIOriginalInteractive preview

Spotlight button

A dark button where a soft circle of violet light follows the cursor across its surface and lights the nearby part of its border.

Category
Buttons
Platform
Responsive

Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Default state

Use this component

Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.

FreeReact 18+Tailwind v3.4 or v4No extra packages

1. Add it with the shadcn CLI

npx shadcn@latest add https://www.thatdesignui.com/r/spotlight-button.json

2. Use it

Every prop is optional
app/page.tsx
import SpotlightButton from "@/components/spotlight-button";

export default function Page() {
  return <SpotlightButton />;
}

Prefer to paste it yourself? Open the .

Under the hood

How it’s built

What’s inside

  1. A 56px near-black button, rounded 12px, with a 1px border, white 15px semibold text and a small violet arrow, on an almost black panel.
  2. A 140px radial violet glow follows the pointer inside the button, and a 90px lavender glow lights the border near the pointer.
  3. Keyboard focus lights the whole border violet.

How it behaves

  • The light tracks the pointer position inside the button.
  • Leaving the button removes the light.
  • Focus is clearly visible without a pointer.
  • Disabled shows no light.

More from ThatDesignUI

Image gallery lightbox

Image gallery lightbox

ThatDesignUIOriginalMedia component

Notification center

Notification center

ThatDesignUIOriginalNotifications component

Interactive chart card

Interactive chart card

ThatDesignUIOriginalDashboard component

Multi-select combobox

Multi-select combobox

ThatDesignUIOriginalForms component