Eduard Bodak's banner
Eduard Bodak's profile picture

Eduard Bodak

@eduardbodak7,013 subscribers

Crafting Websites that Feel Good.

Shorts

004/100 Buttons. A bit of the process on building an animation. When looking at a finished animation or in this example a finished button, it can look quite complex inside the CSS. But when building it, it’s more like a lot of simple steps, one after another. Here I had the idea to make some kind of text animation like the footer logo on the Osmo site. I try to add the base animation with no complex easing, for example transition: translate 0.4s ease. Starting with just moving the one text from bottom to top and the other text to top. Adding a stagger, play around with it. Searching for a way to make it more circular. On the research I found the sin() function inside CSS which can build a more smooth non linear curve for the stagger which creates this circular effect. And step by step adding more complexity like, different easing for hover/hover-out, opacity, 3D transform and more. I use also the sin() function to rotate the letters, so the middle ones are getting more rotated than the outer ones. Another thing which helps is to add a small delay on hover, for example 0.05s or 0.1s, you don’t really see the difference, but when you hover pretty fast on and out it doesn’t get that jumpy. I’m using here GSAP’s SplitText to split every char into spans. And then I’m adding a CSS index variable to every span, starting from the center. SplitText can provide CSS index variables, but you cannot tell it from which direction. For the sin() it’s also important to have a max length, so I add another CSS variable with the max char number on it. Crafting 100 Buttons with Osmo ⏳ Total time: 63h

004/100 Buttons. A bit of the process on building an animation. When looking at a finished animation or in this example a finished button, it can look quite complex inside the CSS. But when building it, it’s more like a lot of simple steps, one after another. Here I had the idea to make some kind of text animation like the footer logo on the Osmo site. I try to add the base animation with no complex easing, for example transition: translate 0.4s ease. Starting with just moving the one text from bottom to top and the other text to top. Adding a stagger, play around with it. Searching for a way to make it more circular. On the research I found the sin() function inside CSS which can build a more smooth non linear curve for the stagger which creates this circular effect. And step by step adding more complexity like, different easing for hover/hover-out, opacity, 3D transform and more. I use also the sin() function to rotate the letters, so the middle ones are getting more rotated than the outer ones. Another thing which helps is to add a small delay on hover, for example 0.05s or 0.1s, you don’t really see the difference, but when you hover pretty fast on and out it doesn’t get that jumpy. I’m using here GSAP’s SplitText to split every char into spans. And then I’m adding a CSS index variable to every span, starting from the center. SplitText can provide CSS index variables, but you cannot tell it from which direction. For the sin() it’s also important to have a max length, so I add another CSS variable with the max char number on it. Crafting 100 Buttons with Osmo ⏳ Total time: 63h

165,738 次观看

Added three new buttons to my library among 22 other buttons. Made in Webflow using custom CSS. Maybe we can make it a Free Button Friday thing but I can't do it alone 👀 It's a cloneable. Link is in the comments.

Added three new buttons to my library among 22 other buttons. Made in Webflow using custom CSS. Maybe we can make it a Free Button Friday thing but I can't do it alone 👀 It's a cloneable. Link is in the comments.

15,627 次观看

Videos

eduardbodak's profile picture

007/100 Buttons. This button was way more complex than I first thought. I love the page transition on the Truus site that Dennis Snellenberg and Jordan Gilroy worked on. So I wanted to use that drawing SVG Path idea somehow and fit it into a button. In best case with a mask effect. The idea was to have an SVG path in the background that fills the button. At the same time, this path should also be used as a mask to reveal the differently colored text. The SVG should also be replaceable and work with other SVGs. For the path animation, I can use the DrawSVGPlugin from GSAP. Sounds like a solid plan. I built the button so far, and it worked great in Chrome and Firefox. In Safari, nope. I used an SVG mask that I referenced through CSS. But Safari can’t handle that properly when the path inside the mask is animated, so the animation lags. There was no simple solution for that. At least I didn’t find something. So I had to rebuild the button in another way. What I found was that the SVG mask animation works in Safari when the mask is placed on the desired element inside the SVG. That’s where foreignObject comes in, it allows you to use normal HTML elements inside an SVG. Using that, I rebuilt the hover text inside the SVG. I then referenced the mask on the foreignObject with a bit of JavaScript. And it worked! The button’s structure looks more complicated than I wanted it to be, but that happens quite often when you need to make something work across different browsers 😃 Crafting 100 Buttons with Osmo ⏳ Total time: 96h

Eduard Bodak

66,648 次观看 • 25 天前

eduardbodak's profile picture

A closer look on the GSAP powered animations in Webflow. Just from my perspective. In short, it’s way more powerful than I first thought. The more I use it, the more I like it. Of course, there are some parts missing. But it's the first version. There's still a lot to come. For example, custom ease would already make a huge difference. Breakpoints. Maybe a way to add custom functions as sometimes you need to calculate stuff in JavaScript to get complex animations. The biggest part for me is that you can just build the animation inside a timeline. This makes it so much easier than writing it as code. You can fine tune it so much more. When there would be a way to export the tween as code to add some more functionality would be awesome. You can also add custom classes with the timeline, which can then be used in custom CSS to add more functionality. With a bit of custom code you can also use breakpoints for your animations. By using the custom event the animation can be used in custom code which can also be pretty powerful. Didn’t test it so much yet, but would be cool if you could just take the event and use for example the onComplete() from GSAP or other stuff. For example. let mm = gsap.matchMedia(); const module = Webflow.require("ix3"); module.ready().then(() => { mm.add( { isMobile: "(max-width: 992px)", }, (context) => { let { isMobile } = context.conditions; if (isMobile) { module.emit("Mobile Animation"); } } ); }); "Mobile Animation" is the name of your custom event. I hope that part will get more powerful. Something I miss on the timeline is that when you select more actions you can just drag all actions. It would be cool if you could move it frame by frame with the arrow keys, like in Jitter for example. Or just write a specific point like when you have one selected. For now I would further write the code myself, but I’m excited to see where it’s going. Maybe there will be a time where you could animate most parts inside Webflow 🙂 Can’t wait for the next GSAP update!

Eduard Bodak

12,590 次观看 • 10 个月前

没有更多内容可加载