Animations, Scroll

Framer Update: Scroll Transforms

Framer Update: Scroll Transforms

Framer Update: Scroll Transforms

Benjamin

·

17:07

·

149K views

·

About this lesson

Introducing Scroll Transforms in Framer. Design expressive landing pages with complete control over the scroll position. Transform any style while scrolling, or select specific sections for fine-grained control. It’s magic. Only in Framer.

Demo: https://transforms.framer.wiki/

🌞 Try Framer for free: https://framer.com

🎉 Follow on Twitter: https://twitter.com/framer

💎 Join Community: https://www.framer.community

0:00yo my name is Benjamin and in this video0:03I'm very excited to cover scroll0:05transforms a brand new framer feature0:08this allows you to transform any layer0:12while scrolling allowing you to design0:14expressive landing pages with an0:17incredible Fidelity and you can combine0:20this with all the existing effects0:22including the recently shipped scroll0:25animations so let me jump into our demo0:28file to show you how it works so this is0:32our sample project in framer without any0:35transforms applied0:37so let's start with our badge0:40this is a fixed layer meaning it's0:43always in view0:45bent to the bottom right corner and0:49pointing to framer.com0:51it also uses the arc component which is0:55available on framer.supply and the arc0:58has a subtle spinning animation applied1:01I'll select the arc component over here1:05in the layer panel1:07and let's add our very first scroll1:10transform1:12which we can do by clicking here so this1:15is the scroll transform UI we have three1:19different triggers all of which we'll1:22cover in this video and then we have a1:25simple from State and a two-state and1:29these work essentially the same way as a1:32Fairfax do in framer1:34and then we have this new transition1:37property that I'll cover in a little bit1:40as well1:41if we open the from effect this is where1:44we can design kind of the initial state1:47so I'll start by setting opacity and1:50skill to one each1:52foreign1:53and then we could customize the rotation1:56property here as well but I want to1:59start with rotate being zero2:01and then jump to the to effect2:05and this is where we can set it to2:07something like 360 or 720. the on scroll2:11trigger means that our transform will be2:15applied from the top of the page all the2:18way to the bottom of our web page so2:20essentially whenever we're scrolling the2:22page this will be rotating which is2:25exactly what I'm after with the badge so2:29here I'm scrolling with my mouse2:31and here I'm scrolling using the2:33trackpad2:35you can see that in both cases the2:37transform is correctly applied on top of2:40our animation but using the trackpad2:43gives us a much smoother result now this2:46is true when scrolling any web page2:49but there's something we can do about2:50this in framer you see there is this2:54magical property here called transition2:57that allows us to add a spring curve on3:01top of our transform3:03so I can customize the spring curve3:06properties here just like any other3:08transition in framer3:10I think this should do the trick so let3:13me go back and give this another preview3:15and let's again compare the difference3:17between a mouse wheel scroll and a3:21trackpad3:23you can see I'm using the mouse here and3:26this provides a much smoother result as3:29the transforms themselves are animated3:33and it's smoothly transitions back into3:36the actual Arc animation3:38and here I'm using the laptop trackpad3:42and you can see that this is also3:45incredibly smooth3:47so we have this rotation animation on3:51top of that we have a rotation transform3:53on scroll3:55and on top of that we say hey do that3:58with a spring curve so when you really4:00think about the level of fidelity we're4:02able to achieve here without having to4:05write code I think that's pretty crazy4:07so let's also apply a transform to the4:10app window in our header here and here4:13I'll show you how to use layer in View4:15the second trigger I'll again edit the4:19from State here I'll set skill to 0.84:24and then we can apply a subtle rotate x4:27value as well4:29and this effectively skews the window a4:32bit which is quite nice as you can see4:35in the canvas preview and we can keep4:38tweaking these values to our liking4:42maybe an even smaller scale4:44and I want opacity all the way to zero4:49our two state is looking good4:53and then let's apply a transition as4:55well now let's give this a preview as we4:59scroll the page you can see that our5:01window transforms into view5:04and this is what layer in view does it5:07starts our transformed as soon as the5:10top of the layer hits the bottom of the5:13viewport and it ends as soon as the5:15entire layer is in view which is perfect5:19for something like a header next I want5:22to highlight that you can also Nest5:25transforms within our app window I have5:28this site preview5:31and we can also apply a transform to5:34this layer even though it's contained5:36within another transform5:38I'll again select layer in view as the5:41trigger and as the initial from effect5:45I'll set skill to 1.55:49this means that our site preview will be5:52scaling down from 1.5 to 1.5:55this is looking good so let's apply a5:58transition and then I'll hit command P6:00to give this a preview6:03and as I start scrolling down to the6:06header we can see that the app window is6:09scaling up as our little preview video6:13here is scaling down6:15you initially only really see the little6:17conic gradients animate over here and6:20then we keep scrolling to reveal that6:23this is in fact a site preview in framer6:26nice so we're almost done with our6:29header there's one more little effect I6:32would like to add6:33which is we have this little Shimmer6:36that you might have noticed on top of6:38the window here and I would like to6:41transform it from left to right6:43so let's quickly do that I'll select the6:47Shimmer layer and I'll apply a scroll6:50transform so even though this layer is6:53only visible within our header I'll keep6:55using on scroll as the trigger in the6:58from State I'll set offset X to -2007:02which is also the width of our Shimmer7:05and in the two effect I'll set offset X7:08to a very high value like 3000 so this7:14is to show that you can get creative7:16with how you use these effects we know7:19that on scroll keeps happening as we7:22scroll the entirety of our page but7:24because we're using a very high value7:26we're seeing a lot of movement on our7:28Shimmer to make sure that this effect is7:31visible I set opacity to 1. I'll Now set7:35it back to something like 0.3 to make it7:39a bit more subtle7:40what's really cool about using on scroll7:43in this way is that our Shimmer will7:46keep transforming even as the app window7:49and the site preview have already7:51finished because they use layer in view7:55it starts from somewhere around here and7:58it goes all the way to the right and8:00whenever it's visible it's always8:02transforming8:04either to the left or to the right8:07lovely so that's it for our header let's8:10move on to the next section and to the8:13next trigger type which is called8:16section in view if you've already played8:20with scroll animations you might already8:22be familiar with this trigger type8:26there's a few transforms I would like to8:28apply to this section but first let me8:31select the section itself it's this8:34layer and it's called intro and defined8:37as a section over here8:39which is the same feature you would use8:41for scroll animations or for smooth8:43scrolling links we have our gradient8:46here then we have the UI layer over here8:51and then we have a frame wrapped around8:53our gradient over here let's start by8:57transforming this layer I'll add a8:59scroll transform9:01and I'll use section in view this9:04triggers when a section is in view9:07instead of the layer itself and I can9:10select the intro section and with the9:13viewport control we can customize when9:16exactly to trigger the transform if the9:19section hits the bottom of the viewport9:21the middle of the viewport or the top of9:25the viewport so now it will start as9:27soon as the top of our section Scrolls9:30into view next let's start customizing9:32our effects I want this layer to fade9:36and move in from the left9:40so I'll set offset X to about minus 3009:45and then I can set opacity to zero9:50I'll also add a transition again9:54and I'll do the same for this layer over9:56here9:57I'll set it to section in view point it10:00to the intro section10:03and then instead of setting offset X to10:05a negative number I'll set it to a10:07positive 300.10:11so these layers will now fade and move10:14in from opposite ends10:16so let's give this a preview10:19as I scroll down to the section10:21you can see that both layers are10:24correctly transformed10:26and that the transform starts as soon as10:29the top of our section comes into view10:31and this is why we're using section in10:34view as we scroll past this both of the10:38layers start transforming so our trigger10:41is a different layer we couldn't use10:43layer in view here because these layers10:46have such different starting positions10:48and sizes that they would not be in sync10:52so regardless of the size and position10:54of a layer if we use section and view we10:57can ensure that they start and end at10:59the same time and yes we can also add11:02Nester transforms here11:05for this section I can select the11:08gradient11:09and apply a rotation transform on scroll11:12just like we did for the badge I'll set11:15opacity and skill to 1 in the from11:18effect and rotate to 360 in the 2 effect11:21and I'll apply a transition11:24and then if we give this another preview11:27we have a much cooler effect11:31the layers settle into their final11:33position as the section is fully in view11:37and the conic gradient animates to 36011:40rotation on scroll let's move on to the11:44next section in which I'll show you how11:46you can combine transforms with some of11:49our own components here I have a stack11:52selected that is wrapped around our11:55ticker I would normally set this to fill11:57AKA 1fr in this case I want to use12:01something like 2 or 3fr so make it a lot12:04wider so that I can also apply some12:07offsets so if I scroll down the page you12:10can see that our ticker is animating12:12itself infinitely just like our badge so12:16let's add a transform12:18with the ticker wrapper layer selected12:20I'll add a new scroll transform and I'll12:24keep the trigger set to on scroll as we12:27don't need this transform to visibly end12:29instead I want to create this effect12:32where we push the ticker forwards or we12:35pull it back a bit whenever we scroll12:37past it so all I need to customize here12:40is the offset X in the 2 effect and we12:44can set it to something like minus a12:46thousand and of course I'll apply a12:48transition if I preview with command B12:52and scroll to the section you can see12:55that the effect is already working it's12:57pushed to the left when we scroll down13:00and it's pulled to the right when we13:02scroll back up the effect might be a bit13:05subtle so I can increase the offset X to13:09something like minus 1500 I'll quickly13:12jump back to the preview and you'll see13:15that the transform is a bit more13:17noticeable now the ticker is pushed and13:20pulled a bit as we scroll past it13:23all while it's also animating infinitely13:27next let's move on to the final example13:31in which we apply transforms to a video13:35so let's take a quick look at the setup13:37first here I have a layer that is13:40defined as a section called stories and13:45within it we have another section called13:47video13:48so let's start by adding an effect to13:52the video layer itself13:55and here I'll use section in View and13:59I'll reference the parent section in14:01this case the stories section and I'll14:04set opacity and skill to 1 in the from14:08effect14:09and I'll scale it down in the 2 effect14:12so it starts out being quite large and14:16it scales down to a more thumbnail-like14:19size as we scroll past the section so14:22let's see what we have so far as we're14:25scrolling past the story section the14:29auto playing video skills down to a14:32smaller size but it also creates extra14:35distance between the video and our copy14:38which we can correct by applying an14:41additional offset y I already tried14:44doing this initially but I accidentally14:46used a positive value where we need to14:49use a negative offset y to bring the14:52video closer to the copy and that does14:55the trick as a final touch here we can14:59also apply a transform to the play icon15:02in the middle I've already showed you15:05you can Nest transforms earlier in the15:08video and here I want to show you that15:10you can also Nest transforms even when15:13referencing sections so for the play15:16icon I can reference the video section15:19and let's just simply fade and scale it15:22into view I'll apply a transition and15:26then let's jump to the section in the15:28preview so now the skill in transform of15:32the play icon will start whenever the15:35top of the video hits the bottom of the15:38browser viewport and here we can15:41customize the viewport control to make15:43the play icon appear later15:46I'll set it to Center15:48and then I'll make the from State a bit15:51more subtle by setting the initial scale15:54to 0.8 instead of zero so now if I jump15:59to the preview16:01we can see that now the play icon16:04transform will only start when the top16:08of the video hits the middle of the16:11viewport so it happens a bit later and16:14using these features the viewport16:17control sections nesting we can create16:21these really intricate transforms and16:24that's pretty much it for this video16:27there is so much more that you can do16:30with transforms in framer including16:32inversion and sequencing so expect more16:37examples to follow for now thank you so16:40much for watching we really hope you16:43enjoy using this feature and stay tuned16:47for more updates coming soon17:00thank you17:03foreign

Watch on YouTube ↗

More in this topic

Framer Update: Logo Shaders2:05
Framer Update: Logo Shaders
Framer Update12K views · 1 month ago
Framer Update: Holo Shader1:46
Framer Update: Holo Shader
Framer Update6K views · 2 months ago
Shader: Chromatic Aberration1:56
Shader: Chromatic Aberration
Framer Update7K views · 2 months ago
Framer Shaders2:28
Framer Shaders
Announcement23K views · 2 months ago
Framer Update: Flow Effect in Layout Templates2:12
Framer Update: Flow Effect in Layout Templates
Framer Update10K views · 3 months ago
Building an Expanding Article Stack in Framer13:14
Building an Expanding Article Stack in Framer
Animations4K views · 4 months ago
Scaling a clipped image on hover in Framer5:41
Scaling a clipped image on hover in Framer
Animations7K views · 5 months ago
Making elements revolve in Framer3:38
Making elements revolve in Framer
Animations5K views · 5 months ago

Create a free website with Framer, the website builder loved by startups, designers and agencies.