Animations

Framer Update: Custom Cursors

Framer Update: Custom Cursors

Framer Update: Custom Cursors

Benjamin

·

16:55

·

57K views

·

About this lesson

We’re excited to introduce Custom Cursors. Design interactive cursors using components, with infinite ways to customize. Tap into the power of Variants, Effects, and Transitions to design interactions with an incredible fidelity. Get started by adding a custom cursor to your Page, then switch its Variants on any layer. Choose between “Replace” to swap the default cursor with a Component, or “Follow” to add to it. It’s a simple feature at first glance, but as you delve deeper you’ll find it’s remarkably versatile. We can’t wait to see what you’ll come up with.

Remix the demo here: https://cursors.framer.wiki/

🌞 Start for free: https://framer.com

📚 Learn more at: https://www.framer.com/academy/

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

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

0:00[Music]0:04[Applause]0:04[Music]0:15feel let's take off get lost0:19yeah right got to feeling like I'm right0:23got feeling0:28like0:32[Music]0:34yo my name is Benjamin and this is0:38custom cursors in framer so without0:41further Ado let's Dive Right In as you0:45can see we currently just have the0:47native desktop cursors on this page and0:51we would like to replace it with this0:54custom component I will double click0:57into it to show you how it's set up1:00as you can see we have a bunch of1:02different variants here starting with a1:05pressed variant that simply skills down1:08the circle on Mouse1:10down and then there's a few variants1:12where we show these different titles of1:15sides made in1:17framer and we would like to animate1:20between all of these seamlessly1:23specifically as we press down I would1:27like the circle to skill down1:31and as we hover over the different cards1:34I would like the cursor to reflect the1:36proper title so how do we add our first1:40custom1:41cursor to start I'll select the entirety1:44of the page our desktop breakpoint and1:49then I'll head over to the new cursor1:51property in the property panel here we1:55can pick between a web cursor which is1:58the existing C css-based2:01cursors or the new custom cursor feature2:05I'll select the custom option and here2:08we can select any component to become2:10our custom cursor so I'll type label to2:14select the component we just looked at2:17and then once selected I can pick any2:20variant to start with so the default is2:24just fine and then we can decide to2:26either have it follow the existing2:28cursor or or to replace it entirely and2:32to add a transition which we'll look at2:34a bit later so I'll close this pop out2:38and let's give this a preview as you can2:41see we have successfully replaced the2:44default cursor with our own little2:47component and as I click to press down2:50it animates to the Pressed variant yet2:53on Hover of these cards nothing happens2:57just yet so how do we switch to the3:00correct variance on Hover I'll select3:03the first card here I'll head over to3:06the cursor property and this time I'll3:09pick set variant framer knows that this3:12page already has a cursor defined and it3:16allows me to Simply switch its variants3:19without having to redo all of these3:21settings so I'll go over all of these3:23cards select set variant and simply pick3:27the matching variant there are are no3:30settings I have to redo everything gets3:33inherited from the page3:37cursor and just like that if we now give3:40this page another preview we'll still3:43have our custom Circle and on Hover it3:47seamlessly transitions into our label3:50showcasing the title of each site so3:54that's how you can replace the native3:57cursor in framer with a custom component4:00that has a pressed variant as well as4:03multiple unique variants to animate4:06between but sometimes you don't want to4:09replace the cursor entirely you just4:11want something to follow it let's have a4:14look at how to do just that next so I'll4:18switch to the next page in our demo4:22project where we have a different custom4:27component this one is semi- trans4:30arent it also skills down on press and4:34it has a subtle background4:38blur so very very simple I'll again4:42select the4:45page I'll then head over to the cursor4:51property I'll select custom cursor and4:55I'll find this outline component this4:58time I'll set the cursor property to5:01follow instead of replace and here we5:04can customize how to position our cursor5:08relative to the native one I'll set a5:11line to left I'll keep position set to5:15bottom and I'll add a negative offset of5:19-6 for both X and Y effectively5:23centering our component we now get this5:27transparent Circle following our cursor5:30around but how can we make this feel5:33much smoother by adding a transition5:40property I'll click add to add a new5:43transition to this5:45cursor and here we can customize5:47properties like stiffness and damping to5:50create unique transitions for our cursor5:53let's see how this one feels now we get5:56this subtle sort of delay a custom5:59spring transition between the movements6:02of the circle it doesn't just change its6:06position it animates to different places6:09so let's tweak the transition to be a6:12little less bouncy a little6:16slower and maybe let's make that even6:19slower with a lower stiffness and a6:23higher6:24damping and there we go the component is6:28following our cursor with super smooth6:33Transitions and it still animates on6:36press as6:37well so that is how you can add layers6:41to the existing cursor and how you can6:44work with custom6:46transitions we've designed this feature6:49to be extremely flexible allowing for a6:52wide variety of use cases so next I6:56would love to run through a few6:57different use cases and show you the7:00unique setup of each starting with7:03videos your cursors don't have to be7:06static layers they could even be videos7:09plus you can be smart about how you use7:13variants for example you can design your7:16own enter and exit animations just by7:19designing a hidden variant so you're7:22animating to and from a specific variant7:26that you control but isn't visible just7:29yet so if we go back to the page I can7:32quickly show you how this one is set up7:36it has the video applied but set to the7:39hidden variant cursor is set to follow7:43it's placed at the bottom left with 407:46pixels offset each and it has a7:50transition then on the graphic here we7:54have a hover effect and two cursors one7:59setting it to a normal pointer8:02cursor and the other switching to the8:06video variant so let's see how this8:09comes together in the preview initially8:13it's as if there isn't a custom cursor8:15at all and then on Hover the video8:19animates into view already playing8:22looping seamlessly with a custom8:25transition applied on top as well so for8:28some use cases designing a custom hidden8:32variant is a really fun trick giving you8:35full control over how layers animate in8:38and out in the next use case I'd like to8:41cover two unique details one you can8:44also use effects in your cursor8:47components and two you can also apply8:50custom cursors without having to set it8:53on the page level initially so here we8:56have this Emoji card each one has a9:00subtle background animation using blur9:03and a loop effect plus each variant also9:06has an appear effect if I then inspect9:09the page setup you'll find that there is9:12no cursor applied to the desktop page at9:15all and instead we have applied unique9:19custom cursors to each of these text9:22layers and have simply picked the exact9:25same component this means you could even9:27use entirely different components for9:30your cursors on a single page and if we9:33give this a preview you can see that9:36these cards have subtle animations and9:39they switch seamlessly as we hover each9:43individual layer the main takeaway here9:46is that you don't have to use a custom9:48cursor on the page level first now it9:50does give you a few benefits like the9:53ability to use set variant as we showed9:56earlier but if you just want unique9:58compos components in specific sections10:01of your page you're also free to set it10:03up like this this next use case has no10:07unique setup and instead I would like to10:09say a few words on transitions your10:12cursors can have multiple transitions10:15one for the following and another for10:18any animation that happens within your10:21component whether that's a variant10:23animation a nested component or an10:26effect all effects and animations in10:29framer are built on top of framer motion10:32our incredibly popular animation10:34framework we shipped several updates to10:37framer motion to unlock features I'm10:40showing you in this video this enables10:42you to design animations and transitions10:45of an unparalleled Fidelity which I10:48think is incredibly exciting let's move10:51on to the next use case which is video10:55controls if I hover over the video a10:59play button appears I can click to start11:01the video the icon turns into a pause11:04icon even after moving away from the11:08video so the cursor is aware of the11:10state of the video and this is made11:12possible with just a few lines of code11:16the two takeaways here are you can11:18design cursors to control elements of11:21your page and two you can mix in a11:23little bit of code to make them stateful11:27in this next use case let's have a look11:29look at how to set up cursors for custom11:32interactions like dragging this shows11:35another unique setup this cursor11:37replaces the default and it's quite11:40large because we want to include both a11:43custom cursor and a label to make this11:46work well I've ensured that the end11:49point of our cursor sits at the perfect11:53center of our component allowing us to11:56use the replace feature without messing11:59up hover States or selection it becomes12:01a hand in the second variant the label12:05animates and on press it becomes a12:08grabbing cursor plus you can see that12:11this pin wheel layer has a bunch of12:13effects plus a set variant applied to12:17the cursor so let's see all of this in12:19action we have this large cursor on our12:23page here on Hover it shows a hand and12:26the label animates its color12:30and on Mouse down it becomes a dragging12:33cursor and we can move the pin wheel12:36around12:37anywhere and if I release the cursor it12:41automatically switches back to the12:43initial variant even without having to12:46move your mouse first which is something12:48we explicitly added support for the12:51takeaways here are if you're designing12:54huge cursors with additional labels to12:57replace the default make sure that the13:00cursor is centered plus you can mix13:03cursors with any of our effects to13:06design truly interactive cursors the13:09next use case highlights how you can use13:11different creative components within13:13your cursor here I'm using the animator13:16from framer dos Supply and the r13:18component available in the insert panel13:21to design this custom animation on Hover13:24next up is blending we made sure to13:27support different blending modes13:29in the cursor feature which you can13:32simply apply within your component here13:35it set to difference which in this demo13:38file is a pretty cool effect because all13:41text stays legible on13:44Hover next your entire cursor can13:47actually also be based on code allowing13:50you to create an infinite amount of13:53custom implementations like this demo13:56where the icon transforms based on the13:58location of your cursor and this brings14:01us to our final use case defining14:04cursors within components allowing you14:07to design all sorts of unique sections14:10like this custom Carousel the cursor14:13itself is very simple a circle with two14:16variants showcasing an arrow each what's14:20unique is that this section itself is a14:23component where I've defined clickable14:26areas to show a unique cursor as well as14:30switch between14:31variants the cursor isn't defined within14:34the component but instead it has been14:37assigned a variable there are two cursor14:40variables here one called left and one14:43called right in the first variant this14:46clickable area is assigned to the right14:49cursor variable and has an interaction14:52that switches it to the middle variant14:55in the middle variant we have this14:57clickable area that now also gets a15:00cursor variable the left one and an15:04interaction that switches it back to the15:07initial variant and this is repeated15:10throughout simply put only the first and15:13the last clickable area have the cursor15:16variables removed and also have no15:20interactions this is how we control when15:23the cursors should appear within each15:26variant the photos are grouped in a15:30stack and the component itself is a15:33stack that simply changes the distribute15:36property per variant from start to15:41Center to end combined this creates our15:45custom Carousel that only shows Arrow15:48controls when applicable and15:51automatically goes back to the page15:53default when we've reached either the15:55end or the start of our carousel15:59and that was the Final Extra use case I16:02wanted to cover the custom cursor16:05feature in framer is easy to use yet it16:07is incredibly versatile unlocking a wide16:11variety of new use cases and creative16:15setups we're super excited to share this16:18feature with you and we can't wait to16:20see how you'll use it on your sites if16:23you want to learn more you can find a16:25free remix link to the demo shown in16:28this video in the description down below16:32that's pretty much it for this video16:35thank you so much for watching and stay16:38tuned for more updates coming16:53soon

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.