BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/motion-primitives/spotlight
This component no longer exists. It was in motion-primitives’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Spotlight

motion-primitives/spotlight
RemovedComponent

A component that creates a spotlight effect following cursor movement.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ibelick/motion-primitives/HEAD/public/c/spotlight.json

Source

spotlight.tsxraw.githubusercontent.com/ibelick/motion-primitives/HEAD/public/c/spotlight.json
1'use client';
2import React, { useRef, useState, useCallback, useEffect } from 'react';
3import { motion, useSpring, useTransform, SpringOptions } from 'motion/react';
4import { cn } from '@/lib/utils';
5
6export type SpotlightProps = {
7 className?: string;
8 size?: number;
9 springOptions?: SpringOptions;
10};
11
12export function Spotlight({
13 className,
14 size = 200,
15 springOptions = { bounce: 0 },
16}: SpotlightProps) {
17 const containerRef = useRef<HTMLDivElement>(null);
18 const [isHovered, setIsHovered] = useState(false);
19 const [parentElement, setParentElement] = useState<HTMLElement | null>(null);
20
21 const mouseX = useSpring(0, springOptions);
22 const mouseY = useSpring(0, springOptions);
23
24 const spotlightLeft = useTransform(mouseX, (x) => `${x - size / 2}px`);
25 const spotlightTop = useTransform(mouseY, (y) => `${y - size / 2}px`);
26
27 useEffect(() => {
28 if (containerRef.current) {
29 const parent = containerRef.current.parentElement;
30 if (parent) {
31 parent.style.position = 'relative';
32 parent.style.overflow = 'hidden';
33 setParentElement(parent);
34 }
35 }
36 }, []);
37
38 const handleMouseMove = useCallback(
39 (event: MouseEvent) => {
40 if (!parentElement) return;
41 const { left, top } = parentElement.getBoundingClientRect();
42 mouseX.set(event.clientX - left);
43 mouseY.set(event.clientY - top);
44 },
45 [mouseX, mouseY, parentElement]
46 );
47
48 useEffect(() => {
49 if (!parentElement) return;
50
51 const abortController = new AbortController();
52
53 parentElement.addEventListener('mousemove', handleMouseMove, {
54 signal: abortController.signal,
55 });
56 parentElement.addEventListener('mouseenter', () => setIsHovered(true), {
57 signal: abortController.signal,
58 });
59 parentElement.addEventListener('mouseleave', () => setIsHovered(false), {
60 signal: abortController.signal,
61 });
62
63 return () => {
64 abortController.abort();
65 };
66 }, [parentElement, handleMouseMove]);
67
68 return (
69 <motion.div
70 ref={containerRef}
71 className={cn(
72 'pointer-events-none absolute rounded-full bg-[radial-gradient(circle_at_center,var(--tw-gradient-stops),transparent_80%)] blur-xl transition-opacity duration-200',
73 'from-zinc-100 via-zinc-200 to-zinc-400 dark:from-zinc-50 dark:via-zinc-100 dark:to-zinc-200',
74 isHovered ? 'opacity-100' : 'opacity-0',
75 className
76 )}
77 style={{
78 width: size,
79 height: size,
80 left: spotlightLeft,
81// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • components/core/spotlight.tsx

Facts

Registry
motion-primitives
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-01
Last confirmed
12 days ago

Go to the source

motion-primitives.com ibelick/motion-primitives on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex