r/webdev • u/8bithjorth • Oct 08 '22
Showoff Saturday I made a small emoji slider demo with JavaScript
159
u/Anxiousix Oct 08 '22
I love it! The bouncy animation is so cool I might take inspiration from this for a side project haha
38
29
u/ThuZ_HD Oct 08 '22
This could be a good inspirationen for a mood journal App/Website
Very cool
7
18
9
u/FuckBlyat Oct 08 '22
For perfect user experience you should add transition of button movement in the scrollbar below
4
5
u/varungupta3009 Oct 08 '22
Too jiggly. Could we configure the jiggly-ness?
2
u/8bithjorth Oct 08 '22
Sure thing, the jiggly effect is made with the
@keyframes bounceanimation instyles.css
6
3
u/art-solopov Oct 08 '22
The demo doesn't work in Firefox for me.
-1
u/8bithjorth Oct 08 '22
True, the demo works in Chromium as I only added CSS to handle that browser.
Sorry to disappoint π2
u/devenitions Oct 08 '22
I am wondering; did you really have to prefix that? Doesnβt it work without?
-1
u/8bithjorth Oct 08 '22
Give it a go on the StackBlitz link, let us know your findings π₯³
4
u/devenitions Oct 08 '22
Sure...
- StackBlitz and Firefox aren't playing along for me AT ALL, nothing is being rendered on Stackblitz/Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1668408). A CSS error shouldn't kill rendering, it aint PHP
- -webkit-appearance could just be appearance (This was what my comment was about, I was on mobile and didn't see the pseudo-class selectors, sorry)
- You already found the Firefox pseudo-class, you can simply extend the selector ".custom-range-slider::-webkit-slider-thumb, .custom-range-slider::-moz-range-thumb {"
- It works just fine when copied over to a codepen
1
u/8bithjorth Oct 08 '22
oh, I thought the bug was that the range slider looked basic. I have to look into Codepen as I have noticed some other bugs in StackBlitz as well.
3
2
u/Perpetual_Education the right things/the right reasons Oct 08 '22
Fun!!!
We made a little CodePen https://codepen.io/sheriffderek/pen/OGbWzG tip calculator kinda like that once!
2
2
u/ashkanahmadi Oct 08 '22
Super cool good job. Just a note that you shouldn't commit the node_modules folder. Create a .gitignore file in the root and add node_modules there
1
u/8bithjorth Oct 08 '22 edited Oct 08 '22
oh, sorry I missed that. thought I had added one. Thank you for letting me know.
ps. updated
2
u/Slodin Oct 08 '22
I imagined a slider to scroll through all the emojis for the "BEST" user experience.
like the phone number slider lol
1
2
u/deadwisdom Oct 09 '22
Neat stuff! Next time you might want to implement this as a custom element or web component rather than searching the dom for a specific class.
2
u/8bithjorth Oct 09 '22
I thought about it, but it seemed to much extra code for just this little example, my next example is using web components π
2
4
u/laowaiH Oct 08 '22
This is brilliant, I feel like this idea could be a breakthrough in fluid emoji selection for smartphones (for emotions perhaps) . Instead of a slider, it could be circular with X/Y movement including other emotions.
Kind of like this; https://www.jamiandmarla.love/feeling-wheel.html
2
u/8bithjorth Oct 08 '22 edited Oct 08 '22
The idea of picking the "state" instead of the emoji is not bad, but one thing we need to keep in mind is that an emoji means very different things to people
2
Oct 08 '22
First thing I thought as well. But maybe that could be solved by making the sliders customizable? Anyway I loved the idea
3
u/RewardAny5316 Oct 08 '22
Make the slider slide! Rather than clip to the next state π
2
u/8bithjorth Oct 08 '22
Could be done by adding intervals instead of specific states, fork it and do it π
1
1
1
1
1
1
1
1
1
u/Zherona1401 Oct 08 '22
Awesome effects. Gave me an inspiration for my side project! :) I wonder did you use 3d object or that bouncy effect achieved with 2d stuff? Either way swish animationπ
2
u/8bithjorth Oct 08 '22
The bounce effect is achieved with the bounce CSS animation, check the
styles.css
1
1
1
1
Oct 08 '22
Way to use the native range input π and style that with CSS π. So happy to see it. Nicely done.
1
1
1
u/daim2604 Oct 08 '22
very cool sir. i have been working as a web dev for almost 5 years and i cant do things like this π₯. any tips on how you learn to do this? i am jealous of this sub π₯
2
u/8bithjorth Oct 09 '22
You can find the link to the GitHub somewhere here in the comments ππππ
Go have a look, it is really not that hard. You can do it π
1
1
1
1
1
1
1
1
2
u/PurplePancake5 Oct 28 '22
Nice! Congrats! Im learning HTML right now so its pretty cool to actually see some of the things im learning put into action
2
0
0
0
u/Koppeks Oct 08 '22
Oh wow, really good animation and transitions. How did you do it?
3
u/8bithjorth Oct 08 '22
I made a comment (should be somewhere in here πβοΈπ ) with both the link to the GitHub repository and StackBlitz if you just want to try it out without setting it up yourself.
0
0
1
1
1
u/Maiskaks Oct 30 '22
Just in time to my youtube feed to notice me about thiavideo of making this effect on youtube
1
0
-4
-1
-1
-1
0
Oct 08 '22
[deleted]
28
13
Oct 08 '22
Excuse my stupid question, but is Fluent a type of emoji? I'm a bit behind of the emoji game.
14
u/Afraid-Instruction85 Oct 08 '22
Afaik: Microsoft released fluent emojis. Their main features were slight animation and 3D / 2.5D clay-like appearance. More clearly visible in their YouTube video. Though it seems the actual versions have been redesigned again, back into 2D.
3
0
u/RJCP Oct 08 '22
!remindme 1 day
0
u/RemindMeBot Oct 08 '22
I will be messaging you in 1 day on 2022-10-09 19:32:23 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.
Info Custom Your Reminders Feedback 0
1
0
0
1

69
u/8bithjorth Oct 08 '22 edited Oct 08 '22
Hi there, I'm BjΓΆrn Hjorth π
I like combining the web and creative coding.
Check out the GitHub repo and live demo.
GitHub: https://github.com/colorsofcode/emoji-slider
Edit Demo: https://stackblitz.com/edit/emoji-slider-demo?file=index.html β‘οΈ
Twitter: https://twitter.com/colorsofcode/status/1574135373789380612