Tinder Style Swipe Cards with React & Framer Motion

  Рет қаралды 4,728

Tom Is Loading

Tom Is Loading

Күн бұрын

Пікірлер: 15
@rahulprasad7371
@rahulprasad7371 2 ай бұрын
Thanks tom for the video, i really like how you explain little things about tools before using it
@samuelsamson690
@samuelsamson690 2 ай бұрын
Bruvh you’re toooooooo goooood. God Bless You.
@tamerahmed9860
@tamerahmed9860 2 ай бұрын
Awesome news! Thanks Mate
@twanadler9
@twanadler9 2 ай бұрын
bro how to apply one by one animation to a array list of items mapped ?
@mudgalz
@mudgalz 2 ай бұрын
Hi bro, Idk you will see it or not. but can u make a video on creating a fully responsive and virtualized masonry component where i can pass data from outside and also render card. I tried react-virtualized but its not working finely, sometimes gettting key error sometime resize error etc.
@harshitpant07
@harshitpant07 2 ай бұрын
@10:15 how does react know its a rotate property and what is -18,18 here
@sohrabkhan101
@sohrabkhan101 2 ай бұрын
React doesn't inherently know it's a rotate property; that's actually controlled by Framer Motion, which @Tom is using here. The useTransform hook from Framer Motion is what maps one set of values (in this case, [-150, 0, 150]) to another ([-18, 18]). The first array represents the input range, and the second represents the output range for the rotation. So, when component moves across the X axis, its rotation will interpolate between -18 and 18 degrees based on its position.
@tomisloading
@tomisloading 2 ай бұрын
Awesome answer, thank you!! 😁
@harshitpant07
@harshitpant07 2 ай бұрын
@@sohrabkhan101 i think you didn't get my question in first case our input is [-150,0,150] whose output as you say is [0,1,0] And in rotate it's [-150,150] output [-18,18] So I am asking how does fm knows it's whether the input is for opacity or rotation is it based on the number of Inputs in array?
@paradoxify_
@paradoxify_ 2 ай бұрын
@@harshitpant07 No it doesn't depend on the number of inputs in array, also framer motion doesn't know whether input is for opacity or rotation, for the opacity when x is 0 we want img opacity to be 1 and when x is -150 or 150, we want the opacity to be 0, so that's why he put three values for opacity, while in rotation when x is 0 we want the rotation to be 0 to, so that's why he skipped the 0 in rotation input array, even if you put 0 it won't make any difference, if he does the same for opacity then when x is 0 of the image, image opacity will go to 0 which we don't want
@pafacil
@pafacil 2 ай бұрын
@@harshitpant07 ​ If I'm not wrong, it just depends on the variable you use then in the "style". He defined a const called "opacity" (could have been named "foo" or whatever if you prefer, but less logical) being a mapping via useTransform. Then, in the style, he is using "opacity" -which means opacity: opacity - (but it could have been "opacity: foo" with a const called foo... it just makes more sense to call it "opacity" :) ). The same with "rotate". Hope this helps
@352Pking
@352Pking 2 ай бұрын
First
@sayantanadityadev
@sayantanadityadev 2 ай бұрын
swiperjs/demos/effect-cards with infinite loop
Build Beautiful Animated Sidebars with React and Framer Motion
17:16
The Most Overlooked Framer Motion Hook is DOPE
9:55
Tom Is Loading
Рет қаралды 4,6 М.
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Try Not To Laugh 😅 the Best of BoxtoxTv 👌
00:18
boxtoxtv
Рет қаралды 4,6 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 53 МЛН
Top 6 CSS Tips You NEED Before Building UI Animations
16:35
Tom Is Loading
Рет қаралды 4,3 М.
7 ways to deal with CSS
6:23
Fireship
Рет қаралды 1,1 МЛН
Why Rive is the Future of 2D Animations in Webflow!
9:09
Pixeto
Рет қаралды 4,8 М.
Please stop using px for font-size.
15:18
Coder Coder
Рет қаралды 214 М.
10 CSS PRO Tips and Tricks you NEED to know
9:00
Coding2GO
Рет қаралды 74 М.
The Unreasonable Effectiveness Of Plain Text
14:37
No Boilerplate
Рет қаралды 610 М.
Build Complex Exit Animations with React & Framer Motion
16:28
Tom Is Loading
Рет қаралды 9 М.
Build Smooth Scrolling Parallax Effects with React & Framer Motion
32:38
Stripe-Inspired Typewriter Animation with React and Framer Motion
16:07
The Advanced TailwindCSS Crash Course
37:39
Tom Is Loading
Рет қаралды 16 М.
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34