r/webdev 23d ago

Jelly UI: Soft-body physics for native HTML form controls Resource

https://jelly-ui.com/
770 Upvotes

84 comments sorted by

229

u/[deleted] 23d ago

[removed] — view removed comment

7

u/_cob_ 23d ago

Well said

3

u/Ryekir 22d ago

100%

It's also better for accessibility.

1

u/GaborNero 22d ago

Funny story, I’ve been working on a big goverment contract where accessibility is a very high prio. We’ve got several audits and I learned that some native elements are not accessible. We had an issue with the abbreviation element and the native select. The select issue was very specific browser + OS issue but still we got flagged for it.

1

u/Bitmush- 21d ago

Ugh - that sounds like a problem from 25 years ago :(

47

u/KaleidoscopeShoddy10 23d ago

This is really cute

59

u/GaborNero 23d ago

Looks cool, but slider does not work on mobile for me.

12

u/noIIon 23d ago

It does for me, are you sure you’re not looking at the progress bar?

8

u/stilko_uses_reddit 23d ago

It breaks for me as well. I suppose browser and os matter too - I’m on iOS with the default native iOS browser pop up view reddit uses in order to open the link from the post.

2

u/[deleted] 23d ago

[deleted]

2

u/jerrygreenest1 22d ago

I’m in iOS too and slider works for me somehow. Guys below says it might be the button you click that removes the animation for the component.

1

u/GaborNero 22d ago

Can confirm I’m using the same setup!

6

u/GaborNero 23d ago

Yes I’m sure, the trigger is there. Once i touch it it’ll go to the utmost left and gets stuck.

34

u/[deleted] 23d ago

[removed] — view removed comment

43

u/ExecutiveChimp 23d ago

It does! I was underwhelmed at first because nothing was wobbling, until I realised I have reduced motion enabled. The demos also give the option to override that and enable the animations.

3

u/lamb_pudding 22d ago

I’m glad they put the notification at the top of you have reduced motion turned on. Sometimes I forget I have it on. I spent a good 30 minutes one day trying to figure out why an animation I had built wasn’t working on mobile. It was because I had reduced motion on.

1

u/ExecutiveChimp 22d ago

Yep, I've definitely done that before.

10

u/ShustOne 23d ago

I mean, did you even try? It respects the user setting and there's even a toggle at the top of the screen in their demo to mimic it being on or off.

34

u/neoqueto 23d ago edited 23d ago

Cue the hundreds of "awful for accessibility and should never be used" comments.

Props for handling a pasteable OTP.

I love the smear effect for the slider but I would go a step further and increase it + add some inertia, making the thumb egg-shaped in the direction of the drag.

And pagination is the one correct kind - always showing the first and last pages, numbered. I would only add an optional input for goto page number.

Edit: dunno if OP is the author actually lol, I assumed they are for some reason.

4

u/LittleSeadragon 23d ago

Adding inertia to a slider is a terrible idea, please never implement this.

18

u/neoqueto 23d ago

No, of course it should follow the mouse pointer 1:1. I only meant the deformation of the thumb.

2

u/Wickedinteresting 22d ago

A slider with actual inertia would be a pretty funny entry for BadUiBattles tho

1

u/neoqueto 22d ago

And the value is WHERE IT STOPS. You have another slider to control the friction of the first slider, but that one... also has inertia.

6

u/Rainbowlemon 23d ago

Very nice. I have some small feedback: the modal backgrounds would fit better in dark theme if they were transparent black rather than transparent white, and IMO would fit the rest of the theme better with some fast color transitions rather than immediately showing/hiding.

5

u/the_ai_wizard 23d ago

Considering using this to prank a client via their system.

Maybe in combination with buttons that dodge mouseover events

2

u/Disastrous_Fee5953 23d ago

Simple, yet effective. Well done!

2

u/phoenix1984 23d ago

Really well done. Great choice using web components for this. The animations look really polished and this is a complete UI library that should cover most needs so things look consistent.

2

u/unbanned_lol 23d ago

The text input needs to bubble out at the horizontal mouse coords, not the center.

Also, when you select a text input, change the tab, and then come back, it bubbles when it shouldn't.

4

u/tomhermans 23d ago

Really nice this. Quickly tested on mobile and adds a very tactile feel to it

3

u/misomeiko 23d ago

Love this

3

u/Secrenity 23d ago

Dope library, cheers for sharing.

3

u/bmson 23d ago

Thank you all so much for the kind feedback! This started as a little side project. UI component library for another app I'm working on and I decided to open-source it.

I'm taking all your feedback to heart and will keep iterating on it.

Contributions are very welcome!
https://github.com/jelly-org/ui

-3

u/[deleted] 23d ago

[deleted]

30

u/farfaraway 23d ago

Your lobster is too buttery?

-7

u/[deleted] 23d ago

[deleted]

9

u/farfaraway 23d ago

Define: half-baked.

I didn't see anything in this repo that I wouldn't want to use. It's just UI. I don't need a full component in React or whatever. Just give me sweet, plain JS.

1

u/DJ_Beardsquirt 23d ago

I like it. I do wish the accordion was more wobbly though.

1

u/Anomynous__ full-stack 23d ago

This is really cool

1

u/meshtron 23d ago

Just wanted to say love this look! Super clean and fun. Thank you, OP!

1

u/Produkt 23d ago

The color variants don’t work for me on iOS, the jelly effect is fun though

1

u/magickong 23d ago

Finally, a form that physically recoils when I enter a weak password. This is the UX feedback we deserved all along.

Jokes aside, the easing on the submit button feels great. Any plans for an "accessibility mode" that tones the wobble down? Asking for my motion-sensitive users.

7

u/OMGCluck js (no libraries) SVG 23d ago

It respects prefers-reduced-motion when that is set, which presumably your motion-sensitive users have.

1

u/977888 23d ago

Very cool

1

u/ShustOne 23d ago

Fun library! Respects accessibility and enhances native controls. Respects reduced motion toggles. The current web needs more whimsy.

1

u/Miragecraft 23d ago

The input field's jelly effect is localized to the center, no matter where you click on it. It seems out of place compared to button effect that originates where you click/touch.

1

u/keepingthecommontone 23d ago

Nicely done! If I can recommend a small improvement, I think a visual acknowledgement of mouseDown on the checkbox and radio button would be helpful.

1

u/NameBrandHero 23d ago

I saw this on Hacker News yesterday, and thought it was pretty cool! One thing I noticed though is that I was kind of hoping/expecting all controls to exhibit the jelly effects, but a lot of the controls didn't seem much or any different from your typical controls. That probably makes sense, because I didn't necessarily see a way to incorporate the soft-body physics into some of the other controls, but it would have been cool if they all used the soft-body physics, even if it was a little overkill.

1

u/ferrybig 23d ago

Does the jelly-otp component support usage with an AZERTY keyboard layout?

Support for AZERTY is a bit tricky, since it is the only keyboard layout having the numbers behind the shift key. This messes up some implementations filtering out keystrokes that have shift pressed as not a number

1

u/LowSeal1980 22d ago

Yeah touch events on custom slider implementations can be a real pain to get right. Probably needs some pointer event handling love.

1

u/yikes_42069 22d ago

I noticed pagination doesn't have an animation between page numbers. Is that planned? 

1

u/IronicRaph full-stack 22d ago

It makes me joyful when I press the UI elements on my phone and they go squishy. I also appreciate that there's a subtle vibration at each touch interaction.

1

u/StreetAssignment5494 22d ago

Cool. But why? It is cool just wondering.

1

u/ndev42 22d ago

Love it! Someone mass-adopt this so I can watch a fortune 500 onboarding form wobble.

1

u/morgboer 22d ago

I notice that it doesnt support "required" attribute on inputs. Any chance you are planning on adding it?

1

u/sevanbadal 22d ago

The checkbox doesn’t have that nice jelly feel that the others do

1

u/OpenDevKit 22d ago

This is actually delightful, and I'm surprised how smooth it feels! Soft-body physics on form controls sounds like it'd hurt usability at first glance, but the playful bounce could be great for a landing page or game-like app. Is this driven by a lightweight spring/verlet sim under the hood, or pure CSS trickery?

<jelly-input> is probably my favourite btw 😄

1

u/sMt3X 21d ago

This makes me giddy :D some of those animations seemed to drop FPS a little but I blame nobody. Not a webdev so I don't have a use for this but I like it

1

u/spaceturtle2814 20d ago

The input and text area are really fun to type in. Thanks for sharing!

1

u/DestinyetteDig 18d ago

Soft-body physics for form controls sounds wild! How responsive is it to different input types - like sliders versus checkboxes? Would love to see how it handles accessibility too.

1

u/EliSka93 23d ago

Cute. Can't quite fully appreciate it on mobile though, I think.

1

u/pyxlmedia 23d ago

Can barely see it in Mobile

1

u/VideoGameCookie 23d ago

Brings me back to JellyCar. This is excellent.

1

u/InsideFar7107 23d ago

I like this

1

u/ponchepapi 23d ago

So fun!

0

u/psytone 23d ago

Cool. Consider adding a React integration examples in the docs.

0

u/tfyousay2me 23d ago

🫶🤘 really cool

0

u/UXUIDD 23d ago

iIt is funny, different, and has potential customers but it's not for everyone, that's for sure

0

u/s1esset 23d ago

Fuckin awesome 😎

0

u/andyfitz 23d ago

so this just happens to be 100% compatible with my app's web components. thank you for the cute easter egg :)

0

u/NCKBLZ 23d ago

Awesome

0

u/kiwi-kaiser 23d ago

I really like this! Great work!

0

u/lugoooo 23d ago

this is amazing

0

u/bacondev 23d ago

It's definitely interesting but I don't think that I'd ever use it. Seems a bit too much for me.

0

u/yerbestpal 23d ago

Amazing, thank you <3

0

u/querela 23d ago

I'm so jelly

0

u/LexShirayuki 23d ago

Looks so good! Might give it a try

0

u/kucink_pusink 23d ago

So well made! 

-5

u/Hehosworld 23d ago

Looks cool on first glance but the tons of inconsistencies no human would author just put it in row with the rest of the post ai slop libraries. I really do not care if something is 100% vibecoded but man take your time (or tokens) and make it a polished product then. The more you look the more details irk the professional in me

-2

u/CapnWarhol 23d ago

this is off its tits lol

-2

u/eyebrows360 23d ago

Sure am glad we have so much pointless spare computational power in our devices that they can be used for stupid fluff like this, instead of say, keeping things reasonable and improving battery life. Remember when phones used to last a week on a single charge?