BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/bucharitesh/magical-mouse

Magical Mouse

bucharitesh/magical-mouse
FreeComponent

A magical mouse component for Next.js apps with next-themes and Tailwind CSS, supporting system, light, and dark modes.

Install it

npx shadcn@latest add https://bucharitesh.in/r/magical-mouse.json

Source

registry/bucharitesh/magical-mouse.tsxbucharitesh.in/r/magical-mouse.json · first 6 KB
1'use client';
2
3import { cn } from '@/lib/utils';
4import { Sparkle } from 'lucide-react';
5import * as React from 'react';
6import { createRoot } from 'react-dom/client';
7
8interface Point {
9 x: number;
10 y: number;
11}
12
13interface MouseSparklesProps {
14 /**
15 * Custom icon component to render instead of the default Sparkle
16 * @default Sparkle from lucide-react
17 */
18 icon?: React.ReactNode;
19 /**
20 * Duration of the star animation in milliseconds
21 * @default 1500
22 */
23 starAnimationDuration?: number;
24 /**
25 * Minimum time between star spawns in milliseconds
26 * @default 250
27 */
28 minimumTimeBetweenStars?: number;
29 /**
30 * Minimum distance between star spawns in pixels
31 * @default 75
32 */
33 minimumDistanceBetweenStars?: number;
34 /**
35 * Duration of the glow effect in milliseconds
36 * @default 75
37 */
38 glowDuration?: number;
39 /**
40 * Maximum spacing between glow points in pixels
41 * @default 10
42 */
43 maximumGlowPointSpacing?: number;
44 /**
45 * Colors for the stars in RGB format
46 * @default ["249 146 253", "252 254 255"]
47 */
48 colors?: string[];
49 /**
50 * Sizes for the stars
51 * @default ["1.4rem", "1rem", "0.6rem"]
52 */
53 sizes?: string[];
54 /**
55 * Custom class name
56 */
57 className?: string;
58}
59
60const MouseSparkles = React.forwardRef<HTMLDivElement, MouseSparklesProps>(
61 (
62 {
63 icon: Icon = <Sparkle className="h-full w-full" />,
64 starAnimationDuration = 1500,
65 minimumTimeBetweenStars = 250,
66 minimumDistanceBetweenStars = 75,
67 glowDuration = 75,
68 maximumGlowPointSpacing = 10,
69 colors = ['249 146 253', '252 254 255'],
70 sizes = ['1.4rem', '1rem', '0.6rem'],
71 className,
72 ...props
73 },
74 ref
75 ) => {
76 const configRef = React.useRef({
77 starAnimationDuration,
78 minimumTimeBetweenStars,
79 minimumDistanceBetweenStars,
80 glowDuration,
81 maximumGlowPointSpacing,
82 colors,
83 sizes,
84 animations: ['fall-1', 'fall-2', 'fall-3'],
85 });
86
87 const lastRef = React.useRef({
88 starTimestamp: Date.now(),
89 starPosition: { x: 0, y: 0 },
90 mousePosition: { x: 0, y: 0 },
91 });
92
93 let count = 0;
94
95 const createStar = React.useCallback(
96 (position: Point) => {
97 const wrapper = document.createElement('div');
98 const color = selectRandom(configRef.current.colors);
99 const size = selectRandom(configRef.current.sizes);
100
101 wrapper.className = cn(
102 'absolute z-[10000] pointer-events-none',
103// … truncated

What it pulls in

npm packages

  • lucide-react

Files it writes

  • registry/bucharitesh/magical-mouse.tsx

Facts

Registry
bucharitesh
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

bucharitesh.in Raw registry item This item as JSON

More from bucharitesh

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
BookbookbuchariteshComponentsFree1 dep · 2 files
Game of Lifegame-of-lifebuchariteshComponentsFreeno deps
Metallic Buttonmetallic-buttonbuchariteshComponentsFree2 deps
Modern Progressmodern-progressbuchariteshComponentsFree1 dep
Pixel Iconpixel-iconbuchariteshComponentsFreeno deps
Split Text Effectsplit-text-effectbuchariteshComponentsFree1 dep
Text Highlighttext-highlightbuchariteshComponentsFree1 dep
View Magnifierview-magnifierbuchariteshComponentsFree1 dep

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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

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 ToolDrift

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 ToolDrift

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