Dojo IconClass Reference

It is amazing how bad some things are documented and how many people are struggling to find the right information.

I have been doing some dojo coding recently and used some javascript code to dynamically create buttons with little icons. How to do it is described here on the dojocampus site. There is an example showing how to set the inconClass attribute to display an icon in the button, in this case a little scissor symbol; the icon class for this is called "dijitEditorIcon dijitEditorIconCut".

The next natural question would be: what other icon classes are available ? One sort of question where you start googling without ever finding a sophisticated answer to your question. You would expect to bump into some reference somewhere listing all those possible icon classes, but nada – nothing. Instead you find a lot of discussion threads where people discuss the very same issue, like for instance here and here. In the latter you read somewhere that all icons are available in /dojo-src/dijit/themes/tundra/images/editor.gif; this gets you part of the answer, at least you can see what icons are available, but you don’t get their class names.

After doing some more investigation I found all those class names actually listed in /dojo-src/dijit/themes/tundra/editor.css.

Thus I wrote a little dojo javascript to create such a reference I hope others find helpful in the future if they bump into the very same question: What Dojo IconClasses are available to create icon buttons ?

4 Responses to “Dojo IconClass Reference”

  1. Matt Says:

    Thanks Axel – this is exactly the reference I’ve been trying to find! :)

  2. amagard Says:

    You are welcome, Matt ! I knew I wouldn’t be the only one looking for this ;-)

  3. jonathan Says:

    thanks!!! a lot… really… i was looking for this too… regards!! :D

  4. Ray Says:

    Thank you very much!i was looking for this!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.