r/web_design • • Jun 27 '18

Testing out this sloth input field

2.3k Upvotes

140 comments sorted by

356

u/AuctoritasRex Jun 27 '18

Sometimes I think I'm pretty handy with CSS, JS and the like, and then I see amazing stuff like this and remember I'm not

88

u/green__machine Jun 27 '18

Nonsense! I'm sure you could pick it up fairly quickly

39

u/AuctoritasRex Jun 27 '18

Thanks for the vote of confidence! Any good reading material you recommend for me to pick anything up?

24

u/green__machine Jun 27 '18

Just answered a similar question above, check that one out!

22

u/johncoates Jun 27 '18

The offerings from A Book Apart are always really good in my opinion https://abookapart.com/

6

u/green__machine Jun 27 '18

Yup, I haven't read their SVG book, but the author of that one (Chris Coyier, of css-tricks.com) is super knowledgeable on the topic. I do have some of their other books and they are great.

2

u/elefandom Jun 27 '18

Collect them all!

2

u/AuctoritasRex Jun 27 '18

Thanks, I'll have a read of their stuff

5

u/[deleted] Jun 27 '18

Find some moderately difficult looking animation/component on the web and replicate it on ur own app, with a lot of help from inspect element. You’ll pick up a bunch of cool tricks

1

u/IAmTheLivingPlanet Jun 27 '18

I would love some pointers as to how you picked up the skills to make things like this.

12

u/anomalousBits Jun 28 '18

I can make roundy corners on boxes.

120

u/[deleted] Jun 27 '18

170

u/green__machine Jun 27 '18

That dude's a hack

43

u/thetravelers Jun 27 '18

Your animation reminded me of the first time i saw this yeti codepen. Why is he a hack?

275

u/green__machine Jun 27 '18

I'm joking, I created the yeti as well 😎

3

u/Westrivers Jun 28 '18

I just want to say youre amazing at css animation

Im curious though, what spurred you to put the time and effort into such a niche area?

Is there a huge demand you saw that others didnt?? (you dont hear a lot about young porgrammers wanting to learn about css animation. People actually look down on css because they dont consider it "programming")

Did you just slide into it?

7

u/green__machine Jun 28 '18

Well, while I do create CSS animation as well, this is actually all done with JavaScript. Different cases call for different approaches.

I actually wouldn't consider what I do to be a niche area, I do all sorts of design and development work. I just mostly only post the more interesting/different things that I work on.

I started my career mid-2000's when everything was built in Flash, so I had to become competent in designing, animating, and programming in order to create websites in that environment. The web has changed so much since then and the tools, while way better, are all separate. So now most people get experience with only the design side, or programming side, or animation side. I think I'm able to come up with outside-the-box ideas because of my background in combining visuals, motion, and code by default.

Not sure if that makes sense to you!

1

u/IanSan5653 Jun 28 '18

I can't speak for OP, but sometimes I get really involved in niche areas because it's just fun and entertaining (and challenging). I'm not usually concerned with what's marketable (though maybe I should be).

1

u/Westrivers Jun 28 '18

what u been into lately?

21

u/thetravelers Jun 27 '18

Nice. Well done

13

u/pastisset Jun 27 '18

I knew it, the art was so familiar! Really admirable I'd say. That kind of animation is something I really wish to learn, if you ever share your secrets I'm all ears (or eyes).

6

u/barshat Jun 27 '18

Damn, I love cool moments in reddit like this one.

1

u/elefandom Jun 27 '18

I remember that one from a bit ago! Awesome work!

1

u/ed_saura Jun 28 '18

dude it is awesome, my perfect work would be to do things like that, I don't know where to start ssssssssssshit.

Love it, for real.

8

u/stevensokulski Jun 27 '18

I’ll give you a hint...

0

u/[deleted] Jun 27 '18

I still don't get it?

4

u/stevensokulski Jun 27 '18

OP on this thread created the yeti animation. He called himself a hack as a joke.

6

u/[deleted] Jun 27 '18

Lol, now I feel stupid; I even thought about that possibility before looking through that thread

3

u/hotjamsandwich Jun 27 '18

I love that yeti, it’s awesome.

50

u/SOL-Cantus Jun 27 '18

Amazing work, but design wise a bit too active for the average user (e.g. having it come and go with active field). A one-off field trigger (sloth pops, then chills without going back down) or limited (it only repeats the cycle a couple times) may make it slightly less painful until someone actually completes input.

Also, to make it slightly less jarring for unfamiliar users, maybe have one of its hands (nails?) already partly on the bar so that the pop up feels like you're revealing a happy, sleepy sloth instead of suddenly bringing him up from the depths of the internet.

22

u/green__machine Jun 27 '18

Good suggestions, we've batted these around internally as well. Thanks!

2

u/salgat Jun 28 '18

Absolutely agreed. It's way too distracting and annoying. Users like static predictable pages, show an effect once and make it super subtle after that.

3

u/Mallanaga Jun 28 '18

Users like static predictable pages

I don’t think I agree with you. Predictable, sure, but not static.

1

u/salgat Jun 28 '18

I don't mean literally zero non-static items, just that stuff isn't moving around all over the page. Subtly is key. None of the major websites I use have that.

1

u/boonzeet Jun 28 '18

If the sloth was there the entire time it would be fine, but the appearance/disappearance of the sloth is distracting.

These animations are technically impressive and cutesey, but they slow down the time taken to do the tasks you actually visit the site to do.

46

u/bruggekiller Jun 27 '18

Man this is so cool. Can i see the code ?

210

u/green__machine Jun 27 '18

Normally I'd share the source as well, but since this is for a paying client I'm going to hold off until it wraps, then I'll probably swap out the graphics and put it on CodePen

29

u/sthornr Jun 27 '18

Please tag me when you do?

42

u/green__machine Jun 27 '18

You got it, dude

18

u/stevensokulski Jun 27 '18

Just post it on this sub! I’m sure we’d all love to see it.

37

u/green__machine Jun 27 '18

I'll be like Oprah with the tags and post. Everyone gets one!

5

u/Xacto01 Jun 27 '18

You're a hero OP.

also could you please tag me? haha

22

u/green__machine Jun 27 '18

No way, I refuse to tag you

4

u/Xacto01 Jun 27 '18

Is there a sub for rejected redditors? I can go there.

3

u/green__machine Jun 27 '18

Aww, I take it back. You can get a tag, too!

→ More replies (0)

1

u/djeclipz Jun 28 '18

!RemindMe 1 month

4

u/gurkanozil Jun 27 '18

plz tag me too fren

2

u/hotjamsandwich Jun 27 '18

Would also appreciate a tag too please

1

u/oompahlumpa Jun 27 '18

add me to the tag list.

0

u/Nicbudd Jun 27 '18

Tag me too please

1

u/silentstrife Jun 27 '18

Saving. Would love to see a codepen.

1

u/[deleted] Jun 28 '18

Me too!

1

u/IAmDrag0n Jun 28 '18

Me too pls

1

u/[deleted] Jun 27 '18

Would like to get tagged, too!

0

u/TheMr_ Jun 27 '18

Same here, please!

0

u/_Zagreb_ Jun 27 '18

Mee too!

0

u/chewbaka97 Jun 27 '18

Tag me to please.

0

u/sggts04 Jun 27 '18

Tag me too please!

0

u/Ssjkr7 Jun 27 '18

One tag here too

0

u/webguy1975 Jun 27 '18

Tag me too please?

1

u/PPCInformer Dedicated Contributor Jun 27 '18

Better yet share it here 😁

3

u/[deleted] Jun 27 '18

Repost in /r/web_design again so we can all see it :)

1

u/spacebandido Jun 27 '18

!RemindMe in 1 month

1

u/RemindMeBot Jun 27 '18

I will be messaging you on 2018-07-27 19:34:44 UTC to remind you of this link.

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


FAQsCustomYour RemindersFeedbackCodeBrowser Extensions

1

u/spacebandido Jul 27 '18

Hey /r/green__machine, can you outsource now?

1

u/ikinone Jul 06 '18

Keen to see your work on codepen! I was sad to see you had to take the Yeti down (perhaps related to client requests?).

0

u/[deleted] Jun 27 '18

[deleted]

3

u/green__machine Jun 27 '18

Do you have a development background already?

0

u/[deleted] Jun 27 '18

[deleted]

39

u/green__machine Jun 27 '18

Cool! So the thing I posted is all JavaScript animation, done with a JS animation library called GreenSock. Different cases calls for different types of animation (CSS transitions, CSS keyframes, JavaScript-based, DOM vs Canvas vs. SVG, etc.). CSS-based effects are a good place to start, though. Val Head and Sara Drasner both have a good material (books + blog posts) out there that covers a variety of animation techniques. CSS Tricks and Codrops are good sites that have a lot of tutorials and blog posts. I also read a web animation book by Kirupa five or so years ago that might be slightly dated now, but did a great job at jumping into some of the different types of animation and some use cases for them. And when in doubt, search around on CodePen and find something you like that looks simple, then try to reverse-engineer it.

2

u/[deleted] Jun 27 '18

Greensock is pretty amazing. Are you using tweenmax?

6

u/green__machine Jun 27 '18

Yup! TweenMax and TimelineMax

0

u/[deleted] Jun 27 '18

[deleted]

1

u/roidabigboi Jun 27 '18

Me tooooo pls!

15

u/sggts04 Jun 27 '18

Do me a favour and please remove that second question mark, its triggering me, please.

10

u/green__machine Jun 27 '18

You got it, pal.

8

u/sggts04 Jun 27 '18

Thank You. Now I can sleep in peace.

32

u/SeaBourneOwl Jun 27 '18

Man, I can only imagine how long the processing time would be.

7

u/green__machine Jun 27 '18

What processing time are you referring to?

23

u/SeaBourneOwl Jun 27 '18

processing the name you input

14

u/green__machine Jun 27 '18

Well in this case there's no processing required since it's not verifying anything and the field is just a name, not a password or something. I'm only checking if there's a value or not.

77

u/SeaBourneOwl Jun 27 '18

slooooths are slooooow

59

u/green__machine Jun 27 '18

Lol oh, I totally missed your joke

23

u/SeaBourneOwl Jun 27 '18

almost like a sloth 👀<3

6

u/Malmoc Jun 27 '18

Beautiful! Do you have a source? :-)

19

u/green__machine Jun 27 '18

Normally I'd share the source as well, but since this is for a paying client I'm going to hold off until it wraps, then I'll probably swap out the graphics and put it on CodePen

4

u/Zimaben Jun 27 '18

I've been running into a patch of canvas work lately and was thinking about making the switch to gsap. Is it worth learning if maybe 1 in 50 things I do require animating?

5

u/green__machine Jun 27 '18

Yeah, gsap is a pretty powerful and handy animation tool. I'd def recommend getting at least familiar with it if you do any front end development. And while it can be used in canvas animations, I'd also look into EaselJS if you're looking for something specifically made for canvas.

1

u/Zimaben Jun 27 '18

Gracias. I'll take a look

-7

u/FieelChannel Jun 27 '18

Copying and pasting lmao

fucks given: 0

3

u/green__machine Jun 27 '18

? I think I'm missing what you're putting down

4

u/Karthan Jun 27 '18 edited Jun 27 '18

I think he is referring to your duplicate comments, which they are exactly the same reply to two different comments asking similar questions.

Anyways, no biggie, and I suspect no ill-intent is meant.

17

u/green__machine Jun 27 '18

Oh, gotcha! Well my answer was the same to both questions, and I didn't want to not answer one of them in case the poster was only checking their notifications. Figured that was the most efficient for everyone

3

u/RunHomeJack Jun 27 '18

is the sloth pure html?

45

u/green__machine Jun 27 '18

No, he's pure sex appeal!

Actually, he's pure SVG, rather. Not sure if that's what you meant, but the SVG is just inline within the HTML. No image or video files or anything.

2

u/budcorthair Jun 27 '18

That's fantastic - I need to start playing with GeenSock. Do you encounter a lot of cross-browser compatability issues with this animation or any of your other svg animations?

4

u/green__machine Jun 27 '18

I encounter some minor quirks each project, but they usually have to do with the interactivity and not the animation specifically. GSAP actually does a pretty great job of handling a lot of the cross-browser quirks with SVG under the hood. It's rare that a bug or cross-browser issue has to do with the animation itself. It's when you start incorporating having to click/move/interact with an object that the browsers sometimes handle things a bit differently.

2

u/twpl Jun 27 '18

Do you have any hacks for autofill for Firefox for inputs like this? (Autofilled content will overlay label)

1

u/green__machine Jun 28 '18

Hmm, off the top of my head, I would try out setting an interval for a short amount of time after the page loads to fire a function that checks if there is a value in the input or not, and to trigger the floating label if so. I'm assuming that an autofill happens just after page load, so I'd test out small durations until I found one that fires just after the browser's autofill fires.

But maybe someone out there already has a solution for this problem.

5

u/Doomwaffle Jun 27 '18

This would scare the crap out of me, I think.

4

u/Aldorato Jun 27 '18

This is really cute! I would love to see you post more stuff like these:>

4

u/_HOG_ Jun 27 '18

Very cute, but sloths don't move that fast.

1

u/marc170298 Jun 27 '18

Are you animating it with JS or CSS?

4

u/green__machine Jun 27 '18

With JS (+ GreenSock).

1

u/Xacto01 Jun 27 '18

Do you have to pay to use GreenSock? or can I just use the library free?

1

u/green__machine Jun 27 '18

The main library is free, yup! Though, there are a few optional "premium" plugins that require a paid license to add.

1

u/webflow99 Jun 27 '18

Nice buddy !!

1

u/green__machine Jun 27 '18

Thanks, guy!

1

u/Mallanaga Jun 28 '18

I’ve used an animation library in the past called GreenSock. Your username is green... and you are a very handy animator. Any connection?

2

u/green__machine Jun 28 '18

No official connection, I am a GreenSock fan though. The"green" is just a coincidence

3

u/oompahlumpa Jun 27 '18

Holy shit.. I wouldn't even know where to start, and I thought I was pretty savvy with front end development.

2

u/zacharyxbinks Jun 27 '18

Well if that's not the cutest input field ever idk what is.

Well done

2

u/cfryant Jun 27 '18

Very well done. I would mess with the timing so it's not so distracting while you're typing.

3

u/VaggLord Jun 27 '18

Awesome dude.... You are " CSS_master".😁

1

u/[deleted] Jun 27 '18

This is gorgeous. Great work!

1

u/TheKr0w Jun 27 '18

Great work! Just some personal feedback but I actually thought his chubby belly was his arm and that it was a glitch. Might be just me though! Either way, great stuff.

1

u/samaxecampbell Jun 27 '18

I didn’t think sloths moved that fast tho

1

u/maxedsolutions Jun 27 '18

That's cool af

1

u/ThinkBiggCnslt Jun 28 '18

This is excellent and should be everywhere.

1

u/[deleted] Jun 28 '18

Holy shit! That’s amazing!

1

u/[deleted] Jun 28 '18

Fantastic!

1

u/[deleted] Jun 28 '18

HI.......... what..... is....... your....................... name?

1

u/Aehan Jun 28 '18

Aw, well done. Crosspost it to r/wholesomedesign if you feel like it!

Need to get that sub in order, but the sloth feels like a mascot or so! :3

1

u/MuggyFuzzball Jun 28 '18

That's creepy

1

u/[deleted] Jul 01 '18

So... when my name would be 👎?

0

u/NovelLurker0_0 Jun 27 '18

Hm....Maybe I'm noob but I don't get what's special with that input field ? oO

EDIT: Oh it's a gif...let me see...

EDIT2: Oh wow awesome!

0

u/emeraldsama Jun 27 '18

Oh that's fun! Well done. :)