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.json2. Use it
Every prop is optionalapp/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
- 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.
- A 140px radial violet glow follows the pointer inside the button, and a 90px lavender glow lights the border near the pointer.
- 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.



