You can find me on Twitter / X: twitter.com/rithmio
@MeekoEdits8 ай бұрын
Just a small remark - saving high velocity data into state, such as cursor position, will result in rather unpleasant performance because of the constant barrage or re-renders whenever you move your cursor. I personally would go with either setting those SVG attributes directly via JS in handleMouseMove or I’d use Framer Motion. Also getBoundingClientRect is kinda expensive and doing it in a mouse move handler will slow the whole thing down considerably. It’d be better to cache it (in a ref for example) and use it from there, since it doesn’t change that often…if ever.
@darshandev17548 ай бұрын
agreed
@Pixelaze9 ай бұрын
I'm calling it now, this channel is gonna blow up. Quality content.
@iamrithmic9 ай бұрын
Woah! Thank you!
@vinitgupta16489 ай бұрын
I just saw this one video and I agree 💯
@jamesonb50759 ай бұрын
I usually don't find youtube content useful, at all.. Buut.. This was very informative and straight to the point, it gets a thumbs up from me, well done!
@iamrithmic9 ай бұрын
Im really glad this was of use. Thanks for the comment!
@NIXO3D9 ай бұрын
This tutorial is GOLD. Thank you for sharing. 🍻
@iamrithmic9 ай бұрын
Glad you found it useful :)
@ardipranata66318 ай бұрын
This channel is a national treasure fr, good & quality content
@iamrithmic8 ай бұрын
Appreciate those word
@neoney9 ай бұрын
Would be nice if there was a constant preview of the browser window next to the code as you're adding classes, so it's easier to remember what which class does
@iamrithmic8 ай бұрын
Will be trying this in future videos
@thehelldesk54638 ай бұрын
Thx for the share you gain one more subscriber. Great quality content.
@iamrithmic8 ай бұрын
Thanks for the sub! Appreciate that a lot
@mcstephen8 ай бұрын
You just got a new follower
@iamrithmic7 ай бұрын
Thank you!
@sandercafe8 ай бұрын
Wow, simple and beauty! thx!
@iamrithmic8 ай бұрын
Glad you like it!
@thenightwolf2249 ай бұрын
AMAZING KEEP GOING BUDDY
@iamrithmic9 ай бұрын
Thank you for the support!
@edt348 ай бұрын
love it! thank you for this
@iamrithmic8 ай бұрын
You're so welcome!
@carlosmorales82377 ай бұрын
Amazing, i have been wanting to do this effect for a while, thanks
@ericnemo83489 ай бұрын
Very nice ! Thanks for sharing !
@iamrithmic9 ай бұрын
Thanks for watching!
@Stephinmaju9 ай бұрын
Absolutely gorgeous 🥰
@iamrithmic9 ай бұрын
Thank you!
@dinoDonga8 ай бұрын
Somewhat reminds me of @Hyperplexed. Straigt up to the point and visually pleasing. Great stuff no pressure just keep doing your thing
@iamrithmic8 ай бұрын
One of my biggest inspirations on YT. Comment means a lot!
@msahu25959 ай бұрын
Love the video ❤😍😘
@iamrithmic9 ай бұрын
Thank you!
@sid45799 ай бұрын
Jeeez the quality
@iamrithmic9 ай бұрын
Thanks! Trying to improve with each video
@marcusalx8 ай бұрын
It's pronounced "veet"! :) Nice video!
@iamrithmic8 ай бұрын
🤦♂️
@diogosoares13096 ай бұрын
Masterclass 👏
@SolidWorksMastery-hr4sg7 ай бұрын
Thanks for the video it's great .... i was trying to replicate also the effect on the 'supabase' website in the "edge function" card the effect that look like an electricity passed or something ... i also see it in vercel website it's so nice but i think i should learn more on animation and svg before i can make it
@michaelkurzewski29378 ай бұрын
This could be great for bento box gradient borders. Just create svgs wrappers with composed children inside. I think it's just a bit of calculating for it to be dynamic size
@r4rbit8 ай бұрын
I've been wanting to share what I've learned through KZbin videos too but never find the courage to do so. What did motivate you to post videos like this one? You make it look easy, great job! This was very informative and enjoyable 👍🏻
@Sammysapphira8 ай бұрын
I smell a new web design trend
@farzadmf9 ай бұрын
Really cool! Would be nice if you shared the code in a repo or something
@iamrithmic9 ай бұрын
Thanks man, lol yeah will be adding it!
@farzadmf9 ай бұрын
Great, thank you!
@iamrithmic9 ай бұрын
It's there mate :)
@farzadmf9 ай бұрын
Great!
@DomskiPlays8 ай бұрын
Really cool!
@mohitashliya87509 ай бұрын
Finally some good knowledge using tailwind
@r-i-ch9 ай бұрын
This is a great effect and code explanation but I can’t help but feel it is a messy mix of techs and concerns. I think taking Tailwind out of the equation could clear things up. Ditto for using pure JS instead of react states. (Ex. You could activate the svg border with a :hover pseudo-class) Still. Hella cool.
@iamrithmic8 ай бұрын
I should have stated, i think supabase also uses tailwind on their landing page. But thank you :)
@r-i-ch8 ай бұрын
@@iamrithmic Well then it looks like I gotta have a talk with someone at Supabase 😁 That's the nature of Dev - plenty of ways to do the same thing. (Plus I will always admit to disliking Tailwind) I'll have to find, I think Kevin Powell did something like this in pure CSS maybe🤔. To be continued... Thanks again for great work and inspiration.
@YashTiwari.official9 ай бұрын
Hey brother please start a series on Three js you are amazing on that ❤🎉
@NekoujiTV8 ай бұрын
hmm... it possibly do same effect on text overlay?
@beehivenetwork20997 ай бұрын
Ok, thanks a lot. Now, how do I build it in plain JS?
@K조셉9 ай бұрын
good tuto brother , but i have a question : how do i deal with big svg in nextjs
@iamrithmic9 ай бұрын
Thank you! The same way, however I would keep an eye out on the viewbox property with SVGs etc. You may have to play around with some values, however the principle shown in this vid would be the same
@HarshilChaurasiya8 ай бұрын
which extension do you use for that equal sign and arrow sign??
@ralusek8 ай бұрын
Here's what I'd change: 1.) This is just semantic, but I'd change the interface of the Flame component to be more agnostic about what is determining where it draws the gradient. Sure, it could be the cursor, but it could also be animated for another reason. Just have it accept gradientCenterX and gradientCenterY rather than implying it should have to do with cursor. Likewise, rather than accepting mouseOnCard prop, which makes it now have assumptions about its parent and where the Flame component will be used, it'd make more sense to just have it have a prop called showGradient 2.) Rather than having gradientCenter/setGradientCenter and the accompanying useEffect inside of Flame, if there's a calculation like that that you need to do, just replace both with a useMemo.
@varunchakraborty60208 ай бұрын
relatively new in this field and kinda confused of memoization stuff, but what's the point of memoization of the result when cause of animation keeps on changing and so does the input to calculations?
@ralusek8 ай бұрын
@@varunchakraborty6020 He's currently running it in a useEffect hook which is also reacting to the changed input. useMemo is just taking his useState/useEffect and combining them to a more semantically correct representation of his goal. With regards to why you'd memoize in the first place, you're right that the input here will change frequently enough such that many of these cases in which it would be memoized will trigger a rerun for a changed input, but there are plenty of times which react might call a re-render with the input having been unchanged. For example, as a user is typing something, they're not moving the cursor but the renders are happening, this memoization would hold in those cases. React also often renders a few times while squaring away its render state with some other underlying state, and those redundant renders need not recalculate the effect, as the cursor will also have the same position in those cases. But in general, I'd say your intuition is on the right track.
@holypizza18 ай бұрын
How come that I never discovered your channel before?
@TenzDelek6 ай бұрын
i believe this could be done in an easier way using framer motion
@_BonsaiBen8 ай бұрын
you should see Vercel's 2024 annual conference page...!!!!
@iamrithmic8 ай бұрын
A thing of beauty
@daleryanaldover65458 ай бұрын
vight innit 😭
@iamrithmic8 ай бұрын
😂 forever conscious of this. was just waiting for someone to pick this up
@stevebendersky20565 ай бұрын
What about responsiveness?
@febrisapermana9 ай бұрын
what theme do you use in your VSCode ?
@itszbari9 ай бұрын
Look like material ocean dark (material community theme)
@iamrithmic9 ай бұрын
Correct :)
@achirasilva25673 ай бұрын
Can we get this effect on a button too?
@ariphharts8 ай бұрын
Why does this feel like Hyperflex's style
@iamrithmic7 ай бұрын
My favourite KZbin channel. A lot of inspiration from him
@SjarMenace8 ай бұрын
How do you know all this code out of your head dang
@AjaySingh-jz8qx8 ай бұрын
Amazing
@Stephinmaju9 ай бұрын
What is the Name of the code theme?
@YassineDorgaa8 ай бұрын
can i applied on card or something semilair to png .. etc
@iamrithmic8 ай бұрын
Would have to be an SVG
@naylord59 ай бұрын
Sweet baby Jesus, you missed the NSFW tag here mate, this is too sexy 🔥 Thank you so much for sharing!
@iamrithmic9 ай бұрын
Haha thank you! Glad you found it useful :)
@fricze8 ай бұрын
fajne
@babayaga58488 ай бұрын
i find this very complicated, dev is hard for me :(
@xbsidesx9 ай бұрын
Why use that @apply instead of just using class name? If you want that as a component, just do a component, not a class with @apply. It’s counterintuitive and not recommended by tailwind.
@muslehuddin88479 ай бұрын
Reusable className
@xbsidesx9 ай бұрын
@@muslehuddin8847 not the case here, it's used literally once. Also, if in the future you need it to be reusable, just do a component, it'll be exactly that ;)
@erentr71678 ай бұрын
@@muslehuddin8847 which tailwind doesnt suggests and warns you to not to do that because whole point of tailwind is to get rid of class names.
@Sanatani_AyushEdit8 ай бұрын
Ezsnippet army like 👍
@vulbyte8 ай бұрын
neat way to do so, but being real i feel like this is massively over coded. i would so something like (skipping most of the verbosity of code just to make it more concise): div: id=followMouse h=25%, w=25% clip:svgOutline then just have a js loop that lerps the xy of the mouse. this way you can also just apply it to every and any element on the page.
@morespinach98328 ай бұрын
Goodness. Tailwind is one of the worst things to happen to CSS. With the tag spaghetti. Any proper css way to achieve this?
@erentr71678 ай бұрын
too many states, too many use effects bro. also you use a ref. you dont need to use that many hooks. you also pass them as props. dont do that. just use a single state with single event listener. you do too much calculation on that function.
@erentr71678 ай бұрын
also you hold cursor x y state in root component which it will rerender each time you move the mouse, it will rerender the whole application, not ideal sorry.
@rollotomasi18328 ай бұрын
It's clear that you just finished your first React tutorial. Leave the heavy lifting to the big boys.😂
@erentr71678 ай бұрын
@@rollotomasi1832 I think its just 4th year of me with typescript & react bro
@ImTheDot7 ай бұрын
.
@Euquila8 ай бұрын
10:40 let's take a moment to appreciate how useless typescript is in general
@Bodom19788 ай бұрын
Would have been better without React or Tailwind.
@schuste68 ай бұрын
why?
@vaccariaofsamsara8 ай бұрын
why? care to explain?
@Bodom19788 ай бұрын
Because if this tutorial was done using native JS and CSS it would be useful to anyone regardless of the frameworks they do or do not use.
@schuste68 ай бұрын
@Bodom1978 is there something wrong with using them? im actually curious because i thought react, tailwind, etc are solid frameworks and they make it easier to create things. also they have more features
@Bodom19788 ай бұрын
There is nothing wrong with using them, I use them a lot, but I also have many projects that do not. A tutorial with native JS and CSS would be easily ported to any framework. But the other way around limits it to only React and Tailwind.