What is a widget?

I’ve been asked a number of times what a widget is, and my answers have changed as widgets have changed.

We’ve all heard the term used in manufacturing; you manufacture a “widget,” when you don’t really care what it is you’re manufacturing. It’s a “widget.” A thing.

Then it was repurposed for use in developer circles when referring to GUI development. A widget is one of a set of decorative and functional pieces for a user interface. For example,

  • A scrollbar
  • A button
  • A dropdown list

Now it’s been repurposed again, and made weirder. Perhaps this is better than creating some meaningless neologism, though.

A Web “widget” is a bit of third-party code you can copy and paste into your page, thereby bringing some outside functionality into your site that you might not already have. They’re built with JavaScript or Flash and incorporate some interesting feature limited only by the imagination of the people who create them:

  • Allow you to submit your credit card number to donate to a cause
  • Browse an online catalog in a very small space
  • Flip through a photo album
  • Play or download music
  • List news items from an RSS feed
  • Edit a wiki or keep track of recent changes
  • Share files

For example, Cory Doctorow writes a new fiction book titled Little Brother. He wants the widest possible audience for his work, and assumes that people will pay for certain versions. So he releases the content under a Creative Commons license, and has a widget created that allows people to listen to the audiobook.

A widget popularizing Cory Doctorow\'s recent book, Little Brother.

They’ve been confused with “badges,” which display an affiliation but generally don’t do anything other than link to an external site.