β’ Add a corner radius (if you want...)
β’ Add a border (use a width of 1-3px)
Now, select your frame and create a component (β + β₯ + K)
β¨ We'll need a little bit of code for the next step. Head on over here, and copy everything you see β pastebin.com/GZpHzA6n
Now, it's time to add an override to the component. With the primary variant selected, go to:
β’ Code Overrides β New File β New Override
β’ Name it whatever you want, and replace the default with the code you copied in the previous step β
Let's apply the newly created override. Select the primary variant and link the override you added earlierβ
If you preview your creation now, you'll notice that the highlight is working, but it's not quite aligned with your cursor π°
To fix this, add a stack ( β₯ + β + β΅ ), and set it to 100% width & height. At this point, you're pretty much done π₯³
But, if you'd like to get rid of the cursor on hover, keep up β
In the component settings, select the primary variant, and:
β’ Under styles hit the β + β
β’ Select "Cursor," and set it to "None"
π You can, of course, edit the colors of your cursor highlighter by changing the rgb values for the "backgroundImage" propery of the "Highlight" function in the code override.
β¨ That's it! Congrats, you have a pretty awesome card that adds a gradient highlight to your cursor. If you found this tutorial useful, please RT to share the love π«Ά
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
Let's make these butter-smooth expanding cards in under 5 min
If you don't have any frames that you want to animate yet, create some β
Select all of the cards & create a component. Then:
β’ create as many new variants as you have cards
β’ drop the opacity of each card to something low (I used 0.45)
β’ then, going through each variant, resize & position one of the cards
β’ set its opacity to 1
β’ resize it to whatever you want
β’ set its position to "fixed,"
β’ center it within the viewport
Add your video source (I'm adding a URL, but you can upload your video for the same result)
β’ bump up the radius (or don't)
β’ make sure "playing" attribute is set to "no"
β’ then increase the height of your breakpoint (to allow for plenty of scrolling)
Letβs make this super clickable glowstick button in 5 minutes without any code β
π¨π»βπ³ Start by creating a button, then turn it into a component.
β’ create a frame with a 100% relative width and height & set its position to absolute
β’ remove the fill & center it
β’ turn it into a vertical stack
β’ rename it to "Container"
β’ set "gap" to 0
Now, we'll duplicate the "container' we just created, rename it to "columns" and nest it within the container stackπͺ
β’ change its position to "relative"
β’ set width and height to "fill"
β’ change the stack direction to horizontal
β’ make sure that that the gap is set to 0
Super easy way to add a chromatic aberration effect to any layer in your Figma project. Legggo β
This first part will break down the fundamentals behind the effect. This will work on simple shapes & text layers. For this example, I will use this really round rectangle
Duplicate your layer 3 times, and fill each one with RGB