Creating Custom Cursors - React and Framer Motion

preview_player
Показать описание
Create custom cursor when hover text, build with react and framer motion

👨‍💻Code:

🔗Link:

Timestamps:
0:00 - Intro
00:07 - Demo
00:28 - Setup CRA
01:10 - Text
02:26 - Cursor
03:30 - Get Cursor Position
06:40 - Install and Use Framer Motion
13:37 - Done

👋🏻Contact Me:

🌎 Find Me Here:

#react #motion #enjoyCoding
Рекомендации по теме
Комментарии
Автор

thank you!! really broke down the solution in a way that was easy to follow and implement, you made my personal website look that much cooler

candyball
Автор

Whoever is placing the problem of lagging..🟥🟥🟥
Replace the variants part with this ✅, adding the transition smooth property:

const variants = {
default: {
x: mousePosition.x - 16,
y: mousePosition.y - 16,
transition: {
type: "smooth",
duration: 0,
},
},
text: {
height: 150,
width: 150,
x: mousePosition.x - 75,
y: mousePosition.y - 75,
backgroundColor: "yellow",
mixBlendMode: "difference",
transition: {
type: "smooth",
duration: 0,
},
},
};

A__ShreyashSantoshSahu
Автор

i can't believe it's that easy, , THANK YOU SO MUCH!!

-exe
Автор

Great video! I can't wait to implement this is my next project.

Skillthrive
Автор

The chickens in the background appreciating you for creating this video.

Its-InderjeetSinghGill
Автор

Thanks Man. The pointer-events: none saved my life.

ageconcepts
Автор

Hi, good tutorial but dont use pageX and pageY use clientX and clientY instead because using page when you scroll down your mouse cursor just desynchronized and looks really weird

ARediting
Автор

Great video. To the point and exactly to understand how this works.

MrFACTS-mkib
Автор

My cursor motion is delaying little bit can you help??

mgamingyoutube
Автор

Why is mine not moving smoothly? There's a bit of delay before the actual cursor follows the circle and it doesn't have the same speed as the actual cursor.

anthonyferrer
Автор

use ref and then use the built in ref.curret?.animate function. It's buttery smooth

PleizyParagas
Автор

This is really great!!! Gonna try this

rizqyhbb
Автор

this is the only video that works thanks

Kdartbe
Автор

Hello! I tried implementing it and it's working... But the response time seems very off. It's lagging VERY much! How to resolve it? and BTW thanks for the tutorial!

manansoni
Автор

amazing and super cool ;) U R the best

silesianguy
Автор

have a subscribe thank you for this video i've been searching to animate my cursor from a long time

divyanshunaudiyal
Автор

my cursor is pretty laggy ... do you happen to know why?

julienheng
Автор

This is good, but the issue is it causes so many re-renders of the entire page. Is there a way to only re-render the cursor?

andrillaf
Автор

is mixblendmode not working for anyone else here.

MihirAmanRaj
Автор

wouldnt this method cause the state to be updated way too much time constantly?

AhmadMughal