8 ms·
JQuery knobs
- hackNightly 15y agoThis is simply stunning. Fantastic work, can't wait until I have a good reason to use this.
- sushi 15y agoI think we will see this being used in lot of 'web infographics'. I personally was never fond of infographics in the image format but it helped spammers derive SEO juice which is how the whole infographic mania started. Infographics meant for web consumption should be made using HTML, CSS and JS not images and this library will help a great deal.
- agumonkey 15y agoIt would be a very good addition to Bret Victor's reactive document widgets.
- dm8 15y agoThis is stunning. UX metaphors can work in number of situations.
- objectatrest 15y agoYep. I have been waiting for something like this for a UI doodle I have. Brilliant start.
- davidw 15y agoCute. One thing that would improve it would be keyboard shortcuts. The editing of the number in the middle feels a bit awkward too. I guess it might make a nice replacement for a slider in certain circumstances.
- rhizome 15y agoMaybe the mousewheel can be put to use here? http://archive.plugins.jquery.com/project/mousewheel http://archive.plugins.jquery.com/project/mousewheel (untested)
- dmethvin 15y agoKind of ... the focus has to be on the number before the mousewheel works though: http://jsfiddle.net/dmethvin/gDfcY/ http://jsfiddle.net/dmethvin/gDfcY/
- rhizome 15y agohmm, i was thinking along these lines: http://jsfiddle.net/gDfcY/6/ http://jsfiddle.net/gDfcY/6/ this gives NaN, tho, because I suck at javascript, but I'm sure there's something workable in there.
- yoklov 15y agohttp://jsfiddle.net/gDfcY/8/ http://jsfiddle.net/gDfcY/8/ Seems to work, but it's probably not the most elegant way it can be done
- tptacek 15y agoBeautiful, but, when is this ever the best UX for a control (outside of sound mixers and sequencers)? (I'm expecting/hoping to get schooled on this.)
- zmitri 15y agoKnobs are the primary interface in many live music controllers. Check out Ableton live, or the evolution uc-33 to see how they are commonly used. Would be very neat for a web based controller. EDIT: Oops, I guess I can't read
- ThomPete 15y agoIt could also be used as a percentage indicator for instance a round a persons picture in the middle.
- lbotos 15y agoThat wouldn't be a knob though. That'd be a circular progress bar.
- romaniv 15y agoKnobs are the primary interface in many DAWs because their developers copy hardware interfaces without too much thought. They translate to computer interfaces very poorly. The main advantage of a hardware knob (over slider) is that you have very good control over it's rate of change. The main disadvantage is that it's hard to turn multiple knobs at once. None of this applies to software knobs. I can't think of why would anyone want to use this over Tangle's sliders aside from prettiness. The only sensible simulation of a "knob" in HTML I can think of would be a text field with a value that goes up or down based on how much you scroll mouse scroll-wheel. Thinking about it, I don't see why it should be different from a slider. You can have a tangle slider that is also scrollable with a wheel (if that is possible to capty with JS). Which is kind of the way normal UI sliders work.
- noisebleed 15y ago
- LyleK 15y agoVery nice!
- 10dpd 15y agoI implemented something like this for my 'Clock' iOS app about 6 months ago. Check out: http://itunes.apple.com/us/app/clock-free/id497161475?mt=8 http://itunes.apple.com/us/app/clock-free/id497161475?mt=8 and double tap to set the alarm using this UI metaphor. The takeaway for me was that UIWebView is still too unresponsive to handle touch events, so although the app uses HTML5, the touch event handling had to be implemented in ObC.
- wildmXranat 15y agoVery slick looking stuff man. If I could suggest something, it would be to give an option to show the data display numbers outside of the circle, or give an option to call a callback handler when the data changes. This way a finger motion adjusts the knob, and the data display is not obscured. Good stuff.
- smoody 15y agoReally nice. I'd make one change if I had the time to fork it myself... allow vertical and/or horizontal mouse movement to control the slider in addition to circular movement. In some cases (such as time-based scrubbing), having the control spin one or more times by moving the mouse across the window is easier than trying to adjust it by circling.
- meanguy 15y agoAudio software made a bit of mess with the whole knob vs. slider thing. Digidesign released several products that used their linear fader code, but they only changed the graphics -- not the mouse code! Yup, you'd move up or down and the thing would randomly turn clockwise or counterclockwise. Somehow this became a standard. 20 years of customer confusion and complaints yields this advice: there are at least three common modes for interacting. 1) up/down | left/right, 2) radial (follow the mouse pointer) and 3) relative radial (follow the pointer, but use it as an an offset in degrees of the original position). The latter is useful for something like a volume control (or any real-world control, really). Otherwise one wrong click and you're at max. In each mode you want both a linear and logarithmic scaling option. Otherwise you have the "soundblaster volume" problem where all the range is between 0 and 30, and 31 to 100 is largely ornamental. There's a bonus mode using the number in the middle as a target. If you click and drag on that, you get the up/down mode even if the outside zone is normally radial. This guarantees that nobody is happy and seems to be the alternate standard in much audio software. Click to activate THEN mousewheel to increment/decrement (again, using the linear or log scaling) is a sane compromise.
- jowiar 15y agoBeautiful, but I don't want to see this in the wild. Knobs are bad for the same reason that pie charts are bad. Perceiving one-dimensional differences is easier than rotational/angular ones.
- inghoff 15y agoFor quantities, yes, but for ratios, I'd prefer pie charts and knobs. "75%/25% odds" would be nicer on a knob display, for instance.
- jowiar 15y agoNot really for ratios. If there's a min and a max, sliders make sense. You can make a better argument for a knob if you have an unbounded range, or an effectively unbounded one (making small adjustments on a large scale). Think old iPods.
- there 15y agoIt's hard to make it 100 without it going back to 0. Maybe a gap between them and if you're already moused down going to up to 100, it stays at 100 as you continue to move the mouse right, but will go back down as you mouse left?
- mseebach 15y agoCompletely agree, but I think the solution is simpler: just like a physical knob, don't let it cross over from 100 to 0 and back. If it's 100, you need to drag it back around the centre to get to 0.
- gresrun 15y agoif (curLevel == maxLevel && angleFromCenter > 0 && angleFromCenter < 45){ // Ignore } else { // Process normally }
- ben0x539 15y agoIt's pretty, but I think it would be more usable if it didn't wrap between 100 and 0.
- 54mf 15y agoA fair point, and I imagine it would be trivial to add a min and max to the configuration options. Without looking at the source, my hope is that it's utilizing <input type="range">, which has min and max built right in. [Edit] I had to look. Apparently it's just adjusting the value of a text field, which is probably better for backwards compatibility but does make me a little bit sad.
- agumonkey 15y agoI wonder how long it will take before someone publish cubase.js now:)
- deleted 15y ago[deleted]
- unwiredben 15y agoI'd really like to see some limits put in -- if you approach 100 from the 90s, have it stick at 100 instead of wrapping around immediately. Same if you try to go below 0. Right now it's really hard to get the know to fix at the limits of its range, something easy to do with traditional sliding controls.
- radiowave 15y agoAgreed, there are some things (like volume controls) where you really don't want wrap-around.
- ender7 15y agoNit: it's jarring that when I first mousedown on the control, the value changes. This makes small, incremental changes difficult. Now, if I click on an area of the circle that is far from the pointer, perhaps it should snap. But if I'm close (or on top of the pointer), snapping is undesirable. (compare to a physical knob, which is the thing being emulated here: touching the knob does not change the input, you must touch and then move)
- bodhi 15y agoThis is the crucial annoyance with knobs in a lot of synthesisers (real and virtual). Another problem with them is that it's not obvious how you change the value. Do you drag to the angle you want? Do you drag vertically? Horizontally Which then gets me thinking about direct vs indirect manipulation. Which then distracts me from eating my breakfast.
- Udo 15y agoI think it might be interesting to have a knob-like control that responds to the scrolling action of the mouse/touchpad. At least with that, you'd have (somewhat) clearly defined up and down actions. Touchscreens could support this with a two-finger-up/down gesture, and then we'd be very well on our way to Trek-like UIs ;-)
- ricardobeat 15y agoSome iOS apps already do (can't remember right now).
- bodhi 15y agoI'm not sure if it's what Udo meant, but the date/time widgets are in this vein. Actually, a knob that functioned like those widgets would be quite interesting.
- gravitronic 15y agoFor my android app DJPad I originally implemented knob control as linear. Move up or right and the value increases, move down or left and the value decreases. I realized this was a mistake when I gave my app to friends to test and had to stop myself from saying "no! you're moving the knob wrong!" and went back to the drawing board :)
- bluetshirt 15y agoThese feel very strange. They don't behave like any knobs I've ever encountered in software.
- peter_l_downs 15y agoExtremely awesome. My only (nitpicky) objection: I wasn't able to do a simple $('#myProgressKnob').attr('value', _new_value_); and have the graph around the edges update. The number in the center changes, but the circular part doesn't get updated (at least, for me). I really wanted to use this in my latest project (shameless plug: http://wwikt-peterldowns.dotcloud.com http://wwikt-peterldowns.dotcloud.com) but couldn't make it happen so I'm switching back over to the twitter bootstrap progress bars in the meantime. Disclaimer: I'm a totally new to JS and could be trying to do something un-possible. Thoughts? Has anyone else been able to make this happen?
- shanekenney 15y agoUse this instead: $('#myProgressKnob').val(_new_value_);
- peter_l_downs 15y agoThank you!
- klr 15y agoThis still does the same thing for me, can you show your code?
- peter_l_downs 15y agoI never got it working. I switched to the twitter bootstrap progress bars instead.
- lunixbochs 15y agoThe design is visually nice. UX-wise... I never encounter controls like this, they don't look functional, and I wouldn't necessarily be likely to click one in the wild.
- mmukhin 15y agowatch out, honeywell might sue you
- faramarz 15y agoWorks beautifully on my iPhone. I can see this being used for filtering "results per page" on ajax shopping websites Great work!
- csomar 15y agoI don't like to sound negative but this looks to me the wrong way to do it. You are redefining here a UX/UI element: The slider. Well, I like breaking the rules and innovation, but you have to care about the end user. I have been working with computers for over 10 years now, and I didn't figure out what these small circles do until I checked the HN comments. I might be a little sleepy, it's late here; however, I have strong doubts that any Internet/Computer semi-literate will figure out what this do and how to make it works. This is the case where a 3D shadowed boundaries, little bars and gradient colors can make a huge difference and guide the user to use the tool.
- coda_ 15y agoReminds me of this: http://www.schillmania.com/projects/soundmanager2/demo/360-player/ http://www.schillmania.com/projects/soundmanager2/demo/360-p... ... which has been around for a few years.
- msmamet 15y agoI thought this was going to be an article about "brogrammers,"
- marcusf 15y agoLike a few other in the thread I'm now stuck looking at an application where I can use this. They look friggin' awesome. For some reason, the basic CSS reminds me of Wipeout, and that makes me both nostalgic in general and nostalgic for my young naivitë for future (I bought everything associated with that game when I was ~12). It's weird that UX can evoke that sort of response, but now I want to use it everywhere.
- grigy 15y agoOne use-case would be setting clock time, though with some modifications. I had such control in mind before. I think for some of us it would easier to make two clicks rather than enter numbers.
- Palomides 15y agocomplaint: no visual way to determine if a knob is read-only?
- csmeder 15y agojQuery knobs + jQuery Rumble http://jsfiddle.net/NQBjn/ http://jsfiddle.net/NQBjn/ Want to help update the script to keep the number in the middle?
- gdubs 15y agoWorks really nicely on an iPhone – much better than a lot of knob controls in many native apps.
- superuser2 15y agoBeing familiar with knobs in digital audio workstation UIs, it's somewhat frustrating that I have to trace the thing around in a circle. Convention is that clicking in the knob and then dragging continuously up or down or using the scroll wheel should change its value.
- etfb 15y agoEven for JavaScript, that's an accessibility nightmare. Horrible!
- SoftwareMaven 15y agoI really like the interaction on my iPad with a couple small issues: don't jump with I first touch and don't allow wrapping from max to min. Alternatively, I don't think I would want to use a mouse with these.
- noonespecial 15y agoMy nit: I can't crank it to 100 without it flipping back to 0 on me. If this was a volume control, that would suck huge.
- dhruvbird 15y agofuckin awesome!!
- illamint 15y agoI wanted to work on some of the usability issues raised in this thread, but I'm not the biggest fan of the style of the original JavaScript, so I ported (most of) the code to CoffeeScript: https://github.com/wyattanderson/jQuery-Knob https://github.com/wyattanderson/jQuery-Knob I left out some of the configurability by choice, and there's no Cakefile yet, but I added the ability to color the knob through CSS via the addition of a hidden style target element. Maybe not a great practice, but I like it better than embedding style information in the code and HTML. Additionally, it'll draw resolution-doubled on Retina displays. Feel free to hack on it.
- Sym3tri 15y ago"jQuery Knobs" sounds like a term for dickish jQuery enthusiasts.
- reid 15y agoFor comparision, YUI offers a similar widget: Dial. "It's like a real-world, analog volume control dial, but with much finer UI control." http://yuilibrary.com/yui/docs/dial/ http://yuilibrary.com/yui/docs/dial/
- junto 15y ago'Dial' is a better word than 'knob'. In British English the word has a variety of profane implications, inviting childish sniggers from grown men: http://www.urbandictionary.com/define.php?term=knob http://www.urbandictionary.com/define.php?term=knob The following are quoted extracts from Roger's Profanisaurus: "knob 1. n. Penis; prick; John Thomas. 2. v. To shag. As in “I knobbed the arse off her”. knob cheese n. 1. Smeg-ma. 2. Foreskin feta found underneath Kojak’s roll-neck (qv) and around the banjo (qv) or cheese ridge. Also knob Stilton, knob yoghurt, Helmetdale (qv). knob chopper n. Precariously balanced lavatory seat which falls down while you’re having a piss and therefore must be held up manually. knob head . knob end n. Fuck wit; thick head; oaf. knob jockey n. Someone who sits on a door handle whilst the door is in motion for sexual gratification. knob shiner n. Someone who is always prepared to polish a pink oboe (qv)." Source: http://en.wikipedia.org/wiki/Rogers_Profanisaurus http://en.wikipedia.org/wiki/Rogers_Profanisaurus
- michael_f 15y agoAm I the only one who thought this post was about people? Cool coding though :)
- joneil 15y agoI came in expecting to hear people ranting about why jQuery is inferior to some other Javascript framework / coding style. Instead the people are positive and the sample code is sweet...
- jacobr 15y agoNice, but a bit annoying to mix styles and other settings in the data attribute like that, and they would have to be repeated for each knob. A library to easily parse custom CSS properties would be pretty cool. The "CSS" could be either in regular stylesheets (browsers ignore properties they don't understand), in a data-style attribute or maybe in a <style> element with a custom type attribute value. Browsers ignore properties and selectors they don't understand anyway. <style> .knob::-jquery-knob { ... } </style> or <style type="text/jquery-knob"> .knob { ... } </style> or <input style="width: 150px; -jquery-knob-skin: tron">
- holgersindbaek 15y agoI would love to be able to use this with other canvas-shapes... How can this be implemented?
- captaincrunch 15y agoThanks! We were starting to create our own custom knobs for our site (verelo.com). This saved us a lot of time. We'll definitely be contributing back. Thanks!
- sltkr 15y agoIt seems that the text field accepts arbitrary numbers and then sets the knob to a rather random-looking position. It would make a lot more sense if these values were clipped to the range of the knob.
- biznickman 15y agoSo I first tried this on mobile and that's where this interface because horrific. As my thumb slides over the number toward the top of the circle, I can't see what I've selected.
- biznickman 15y agoSo I first tried this on mobile and that's where this interface becomes horrific. As my thumb slides over the number toward the top of the circle, I can't see what I've selected.
- deleted 15y ago[deleted]