BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/@react-bits/BlobCursor-TS-CSS

BlobCursor

react-bits/BlobCursor-TS-CSS
FreeComponent

Organic blob cursor that smoothly follows the pointer with inertia and elastic morphing.

Live preview

live · rendered by the registry
Rendered by @react-bits on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.reactbits.dev/r/BlobCursor-TS-CSS.json

Source

BlobCursor/BlobCursor.tsxwww.reactbits.dev/r/BlobCursor-TS-CSS.json
1'use client';
2
3import React, { useRef, useEffect, useCallback } from 'react';
4import gsap from 'gsap';
5import './BlobCursor.css';
6
7export interface BlobCursorProps {
8 blobType?: 'circle' | 'square';
9 fillColor?: string;
10 trailCount?: number;
11 sizes?: number[];
12 innerSizes?: number[];
13 innerColor?: string;
14 opacities?: number[];
15 shadowColor?: string;
16 shadowBlur?: number;
17 shadowOffsetX?: number;
18 shadowOffsetY?: number;
19 filterId?: string;
20 filterStdDeviation?: number;
21 filterColorMatrixValues?: string;
22 useFilter?: boolean;
23 fastDuration?: number;
24 slowDuration?: number;
25 fastEase?: string;
26 slowEase?: string;
27 zIndex?: number;
28}
29
30export default function BlobCursor({
31 blobType = 'circle',
32 fillColor = '#5227FF',
33 trailCount = 3,
34 sizes = [60, 125, 75],
35 innerSizes = [20, 35, 25],
36 innerColor = 'rgba(255,255,255,0.8)',
37 opacities = [0.6, 0.6, 0.6],
38 shadowColor = 'rgba(0,0,0,0.75)',
39 shadowBlur = 5,
40 shadowOffsetX = 10,
41 shadowOffsetY = 10,
42 filterId = 'blob',
43 filterStdDeviation = 30,
44 filterColorMatrixValues = '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 35 -10',
45 useFilter = true,
46 fastDuration = 0.1,
47 slowDuration = 0.5,
48 fastEase = 'power3.out',
49 slowEase = 'power1.out',
50 zIndex = 100
51}: BlobCursorProps) {
52 const containerRef = useRef<HTMLDivElement>(null);
53 const blobsRef = useRef<(HTMLDivElement | null)[]>([]);
54
55 const updateOffset = useCallback(() => {
56 if (!containerRef.current) return { left: 0, top: 0 };
57 const rect = containerRef.current.getBoundingClientRect();
58 return { left: rect.left, top: rect.top };
59 }, []);
60
61 const handleMove = useCallback(
62 (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => {
63 const { left, top } = updateOffset();
64 const x = 'clientX' in e ? e.clientX : e.touches[0].clientX;
65 const y = 'clientY' in e ? e.clientY : e.touches[0].clientY;
66
67 blobsRef.current.forEach((el, i) => {
68 if (!el) return;
69 const isLead = i === 0;
70 gsap.to(el, {
71 x: x - left,
72 y: y - top,
73 duration: isLead ? fastDuration : slowDuration,
74 ease: isLead ? fastEase : slowEase
75 });
76 });
77 },
78 [updateOffset, fastDuration, slowDuration, fastEase, slowEase]
79 );
80
81 useEffect(() => {
82 const onResize = () => updateOffset();
83 window.addEventListener('resize', onResize);
84 return () => window.removeEventListener('resize', onResize);
85 }, [updateOffset]);
86
87 return (
88 <div
89// … truncated

What it pulls in

npm packages

  • gsap@^3.13.0

Files it writes

  • BlobCursor/BlobCursor.css
  • BlobCursor/BlobCursor.tsx

Facts

Registry
@react-bits
Type
registry:component
Access
Free
Files written
2
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on @react-bits www.reactbits.dev DavidHDev/react-bits on GitHub Raw registry item This item as JSON

More from @react-bits

All 556 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AnimatedContentAnimatedContent-JS-CSS@react-bitsComponentsFree1 dep
AnimatedContentAnimatedContent-JS-TW@react-bitsComponentsFree1 dep
AnimatedContentAnimatedContent-TS-CSS@react-bitsComponentsFree1 dep
AnimatedContentAnimatedContent-TS-TW@react-bitsComponentsFree1 dep
AnimatedListAnimatedList-JS-CSS@react-bitsComponentsFree1 dep · 2 files
AnimatedListAnimatedList-JS-TW@react-bitsComponentsFree1 dep
AnimatedListAnimatedList-TS-CSS@react-bitsComponentsFree1 dep · 2 files
AnimatedListAnimatedList-TS-TW@react-bitsComponentsFree1 dep
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex