Icons

A set of built-in icons in jQuery Mobile can be applied to buttons, collapsibles, listview buttons and more. There is an SVG and PNG image of each icon. By default the SVG icons, that look great on both SD and HD screens, are used. On platforms that don't support SVG the framework falls back to PNG icons.

Icon set

The text in the buttons below show the name of the icon used in that button.

In widgets where you set the icon with a data-icon attribute you use the name of the icon as value. For example: data-icon="arrow-r".

To add an icon to link buttons and button elements, use the name prefixed with ui-icon- as class. For example: ui-icon-arrow-r. See also button markup.

Custom Icons

Icons are displayed as background image of :after pseudo elements. Target the pseudo element to set a custom icon.

You can safely use SVG icons. The framework contains a SVG support test and adds class ui-nosvg to the html element on platforms that don't support SVG. Use this class in your CSS to provide a PNG image as fallback.

Icon positioning

By default, icons in input buttons are placed to the left of the button text. This default may be overridden using the data-iconpos attribute to set the icon position to "right", "top", or "bottom". In case of link buttons or button elements you have to add an icon position class (ui-btn-icon-[value]).

Removing the disc

The semi-transparent dark circle behind the icon ensures good contrast on any background color so it works well with the jQuery Mobile theming system. If you prefer to not have this disc, it can be removed by adding the class ui-nodisc-icon to the element or its container.