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).
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.