Chonky Menu Re-Creation
nathanmanousos.com
nathanmanousos.com
Usually people use "easing functions", which are convenient since they typically have a range and image both in [0.0 .. 1.0] [1] (although sometimes the range is slightly above 1 or below 0 to produce some "effect"). CSS has a cubic-bezier function [2] that can be used to replicate pretty closely all sorts of easing functions.
Functions that look like an "S" when plotted are called "sigmoids", a popular one used in graphics applications is called "Smoothstep" [3].
--
2: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-func...
Tap-or-swipe-to-open, and tap-or-swipe-to-close have rapidly engrained themselves as the easiest to understand for users. I'd love to see this demo with that in mind.
I beg to differ. I find hold-and-drag menus faster to interact with when using a mouse, trackback or a touchpad. But it is possible to support it, while not requiring it. On button down the system enters a state where one of three things can happen.
1. The button is released. Then the menu should togle open and wait for another click and relase to select an entry.
2. The pointer moves more than a threshold. Then the hold-and-drag behavior is initiated.
3. 50ms or similar pass and the hold-and-drag behavior in initiated.
The last case is to avoid flickering in case somebody has a slow click and release cycle.
This or similar behavior used to be (still is) default behavior of many desktop UI toolkits.
I think you’re measuring a different dimension than I am. I’m talking about ergonomics and accessibility, not speed. Stretching several inches up a screen in a single gesture breaks most fundamental UI design guidelines. It’s hard for people to pull off quickly and accurately.
Not to mention the fact that it doesn’t allow for longer lists so just isn’t useful in general, unless the menu is toggled open to be scrollable.
On a non-Apple trackpad, I'm sure. Apple / macOS has had "3 finger drag" for a good few years now.
With it, there's no clicking involved: you put 3 fingers on your trackpad and move them and it's a drag operation. There's even a timeout / grace period before the drag is actually "committed".
You can also flick any one of your 3 fingers and it will drag + move your cursor with inertia.
And before they introduced 3 finger drag, there was always a timeout when doing tap + drag to account for running into the physical edge of your trackpad.
Having said all that, yeah I agree this isn't a great interaction on non-mobile devices.
For a desktop-specific version of this, I'd definitely allow it to persist open after a single click. Maybe I'll add that.
And even if it'd have worked I don't appreciate UI elements where I'm forced to obscure the choices I'm picking between.
Not really. Put a second finger at the bottom of the touchpad, then release the first finger (without dragging while both fingers are down). Poof, you just got yourself a whole touchpad's worth of additional height.
They've worked like this forever, and since I pretty much only use a touchpad, movement like this is pretty second-nature for me.
Especially when you can fix it by just keeping the menu open.
Why would you use a second finger when your thumb is already hanging out there at the bottom of the trackpad? :)
How I drag things on a trackpad (or a trackpoint for that matter) hasn't changed since the 90s. There isn't literally a button there under my thumb any more, but it makes no difference. I don't really follow the comments that this is unintuitive; most computer interaction is learned rather than intuited, and this interaction has simply not changed. Perhaps other ways of dragging were added, but they were always inferior.
This was meant as a study in how to do certain types of fluid animations.
If it doesn't work for you, please have a look at the video where I demonstrate and talk through everything:
Super fast and buttery smooth animation. I'm impressed
Any chance you could add a feed to your blog?
I haven’t seen this kind of “non-button button” before. Is this a common UX choice?
It was super quick to use and I really enjoyed it, especially in Music.app e.g to quickly build listening queues from a list of tracks.
Nowadays they dialed down on that paradigm (probably because of drag and drop support mostly) but you can still find it in some places (e.g home screen icons)
I find it a bit more awkward than before though because the popping is now time-based ever since Force Touch was dropped at the hardware level.
(Damn how I liked Force Touch, the irony is I realised how much I valued it only ever since it disappeared. The force-touch anywhere on the keyboard to turn the whole screen in a caret moving surface was so much better than today's long-pressing space in subtle but very tangible ways)
One area that people tend to make naive mistakes in motion design is directly driving the playhead with something like drag distance. For instance, if you drag down on the home screen of Android, stop, and hold; you can see the transparency of the homescreen icons and of the Quick Settings tiles are both controlled by how far you've dragged. The opacity of those icons is determined by your arbitrary drag distance, instead of something more meaningful (like which direction the transition will animate when you let go).
One of the nice aspects of this menu is that it's always clear which item is active. You can't drag to an indeterminant state between two items.
If you look at the inspiration from twitter (linked at the top of the post) you'll see that is by design.
As soon as I want to select something and move my finger slightly, the menu disappears, although I am still with my finger on the button
Re: click and drag: I love those kinds of menus (notably on macOS, the menubar works like this when you drag). It would be better however if you supported click to open as well, as this is what most users would expect.
I've seen a number of similar things in the past and wondered if there was a way to quickly test a UI idea using helpful building blocks.
It was built in a fairly indecent way, but in my testing it always was responsive so I never optimized it, since it’s just meant as a learning tool.
Did the original iOS version have to use similar math, or would that have been implemented with native iOS components?
took a second to figure out that i had to hold the click.
please dont ever add anything like this to a website
> So, I recklessly replaced all the elements of my menu that needed to animate with SpringLayers and just set the whole thing to re-render sixty times a second. I thought surely this would cause performance issues because I’d be re-calculating a spring value for each property of each animated layer each frame, but I never had an issue (on desktop at least), so given that this is a prototype, I just went with it.
The moment I move my finger the page scrolls and the menu collapses.
The menu works as intended for me on iOS but I don’t use Android.
I tap and hold, then drag without releasing.
A quick comment on UX - my laptop is old (see: the aforementioned ancient processor), and these types of menus are extremely inefficient for screen real-estate. On a 1366x768 display, most modern webapps/applications simply need that full screen real estate. They become unusable if you try to split in either direction (which I want to do oh so often, using a tiling window manager). Even when given the full screen resolution, some things are simply unusable.
I think a design like this is at risk of falling into the "always unusable" category for hardware like mine. Of course, I know this is just a demo, and context matters a lot, but I still think it's something worth considering.
If each menu item is 65px in height - on a 1366x768 display, once you account for taskbars, titlebars, browser tab interfaces, menu bars, etc, you'd probably be lucky to have about 500px of vertical real estate left for the main content. So you'd barely be able to shove ~7.5 elements on screen with a list like this. Just food for thought.
If I was making something like this for use in a real desktop/web app, I'd certainly approach it differently.
Feature Policy: Skipping unsupported feature name “autoplay”. chonky-menu
Feature Policy: Skipping unsupported feature name “clipboard-write”. chonky-menu
Feature Policy: Skipping unsupported feature name “encrypted-media”. chonky-menu
Feature Policy: Skipping unsupported feature name “gyroscope”. chonky-menu
Feature Policy: Skipping unsupported feature name “picture-in-picture”. chonky-menu
I looked into it, it is the YouTube embed on the page that is triggering that, I suppose any YouTube embed will cause that.