Badging for Everyone

Apple’s badges are excellent. Apart from just looking good (notice the subtle shading on the right) and standing out, they are effective.

The fundamentals of any good interface should always be, most important, simplicity; next, consistency and after that, specificity. And these badges are just that, they send a simple, clear and consistent message to the user – “there ## number of things you care about right here”.

But to dig a little deeper… what makes these badges excellent? – the fact that they pervade the user’s environment, that’s what is key.

When badges pop up any time you drag messages in Mail, songs in iTunes, people in Address Book, or pictures in iPhoto, for users, the little icons send more then just a message, they convey meaning and a sense of familiarity.

When a badge comes up on one of my dock icons I know there is something at that application that I ought to check out (in a timely – but not quite urgent fashion). It doesn’t matter what the meaning is – the message is the same regardless of the fact that they may mean errors in xCode, unanswered messages in iChat, or unread messages in Mail.

And so it’s a shame that AppKit doesn’t doesn’t provide a way to create badges for your own OS X apps – developers, I’m sure, would love to tap into this useful interface element. Apple devs probably wouldn’t mind either – as it stands each and every app that uses the badges has its own copy of the badge images… and NSApp doesn’t provide a private method either (I’ve checked).

Download CTBadge
~150 KB

But these badges are just too good to pass up (no, really, they are) so here are a few tiny methods that’ll do the work for you.

As a side note, notice how the badge in iTunes is noticeably different than the badge in Mail/iPhoto/etc? Radar 4402569

Update: Updates and other info will be maintained at svn.oofn.net.

4 Responses to “Badging for Everyone”

  1. […] Lately, inspired by John Gruber’s recent assertions that the Apple Human Interface Guidelines are no longer relevant (a good summary can be found here), the new, fancier widgets made by various Cocoa developers have come into the spotlight. Daniel Jalkut, a Very Cool Guy, developed a bunch of very nifty widgets while revamping the interface for his unbelievably cool application FlexTime, and was so kind as to blog about his thought process while doing it. His blog entry pointed me to Matt Gemmell’s enormous stack of custom-made widgets, replete with shiny screenshots. My interest piqued, I fired up Google and found Sean Patrick O’Brien’s iLifeControls framework, a class-dumped version of Disco’s Smoke framework, Toxic Software’s Toxic Progress Indicator and TXTableView, Chad Weider’s badging and gradient code, Blake Seely’s BSRoundedBox, Andy Matuschak’s Polished Metal buttons, AMViewAnimation, and OpenHUD framework, Andreas M.’s jaw-dropping amount of custom widgets, Erling Ellingsen’s CGSWindowWarp exposé, John Pannell’s PSMTabBarControls, Uli’s freakin’ plethora of awesome doodads, Rainer Brockerhoff’s RBSplitView, and Ankur Kothari’s CoreGraphics framework. […]

  2. m2h3js1h says:

    Hello, how are you? What is your name?

  3. […] “NatsuLion is published under the Modified BSD license and shipped with Sparkle, Growl, CTBadge and OpenSSL.”  Their latest download is here.  NatsuLion is free and requires Leopard […]

Leave a Reply