##

Demos

Menu Search

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

    .ui-icon-myicon:after {
    	background-image: url("iconimg.svg");
    }
    /* Fallback */
    .ui-nosvg .ui-icon-myicon:after {
    	background-image: url("iconimg.png");
    }

## 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]`).

Left Right Top Bottom

## Icon-only

Use "notext" as value for icon position if you want to create an icon-only button.

Delete

## Icon shadow

Set `data-iconshadow="true"` to enable icon shadow for `input` buttons, or add class `ui-shadow-icon` to your button markup.

Note: Icon shadow (option `iconShadow` in the button widget and class `ui-shadow-icon`) is deprecated as of jQuery Mobile 1.4.0 and will be removed in 1.5.0.

Icon shadow Icon shadow

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

No disc No disc

Example of the class being applied to a wrapper.

Delete Plus Minus Check

## Black vs. white icon sets

Icons are white by default but you can switch to black icons by adding the `ui-alt-icon` class to the element or its container. This also changes the color that is used for the discs.

Alt icon Alt icon

Example of the class being applied to a wrapper.

Delete Plus Minus Check

## Combining alt and nodisc

Example of the classes being applied to a wrapper.

Delete Plus Minus Check

Example of the classes applied to the `UL` or `OL` to change to the black icons for each list item.

- Acura
- Audi
- BMW
- Cadillac
- Ferrari

Example of the classes being applied to a collapsible.

#### Heading

I'm the collapsible content. By default I'm closed, but you can click the header to open me.

- Home
- Introduction
- Buttons
- Button widget

- ### Checkboxradio widget

  - Checkboxes
  - Radio buttons

- ### Collapsible (set) widget

  - Collapsible
  - Dynamic collapsibles
  - Collapsible set

- ### Controlgroup widget

  - Controlgroup
  - Dynamic controlgroups
- Datepicker

- ### Events

  - Swipe list items
  - Swipe page navigation
- Filterable widget
- Flipswitch widget

- ### Forms

  - Forms
  - Hide labels
  - Field containers
  - Forms disabled
  - Forms gallery

- ### Grids

  - Grids
  - Buttons in grids
  - Custom responsive grids
- Grouping and dividing content

- ### Icons

  - Icons
  - Grunticon loader

- ### Listview widget

  - Listview
  - Listview autocomplete
  - Listview autocomplete remote data
  - Listview autodividers linkbar
  - Listview autodividers selector
  - Listview Nested Listviews
  - Listview collapsible list items (flat)
  - Listview collapsible list items (indented)
  - Listview responsive grid
- Loader widget
- Navbar widget

- ### Navigation

  - Navigation
  - Linking pages
  - PHP redirect demo

- ### Pages

  - Pages
  - Single page
  - Multi-page template
  - Dialog page

- ### Panel widget

  - Panel
  - External panels
  - Fixed panels
  - Panels responsive
  - Custom panel style
  - Panel open on swipe
  - Panel external and internal

- ### Popup widget

  - Popup
  - Popup alignment
  - Popup arrow size
  - Dynamic popups
  - Popups with iframes
  - Popup image scaling
  - Popup outside multi-page
- Rangeslider widget
- Responsive Web Design

- ### Selectmenu widget

  - Selectmenu
  - Custom select menu
  - Custom select menu with filter

- ### Slider widget

  - Slider
  - Slider flip toggle switch
  - Slider tooltip

- ### Table widget

  - Table Column Toggle
  - Table Column Toggle demo
  - Table Column Toggle heading groups
  - Table Column Toggle options
  - Table Reflow
  - Table Reflow heading groups
  - Table Reflow stripes and strokes
  - Table Reflow custom styles
- Tabs widget
- Textinput widget

- ### Theming

  - Default theme
  - Classic theme

- ### Toolbar widget

  - Toolbar
  - Dynamic toolbars
  - External toolbars
  - Fixed toolbars
  - Fullscreen toolbars
  - Fixed external toolbars
  - Persistent toolbars
  - AJAX optimized toolbars
  - Form in toolbar
- Transitions

- ### 3rd party API demos

  - Backbone RequireJS
  - Google Maps geolocation
  - Google Maps list toggle

- Home
- Introduction
- Buttons
- Button widget

- ### Checkboxradio widget

  - Checkboxes
  - Radio buttons

- ### Collapsible (set) widget

  - Collapsible
  - Dynamic collapsibles
  - Collapsible set

- ### Controlgroup widget

  - Controlgroup
  - Dynamic controlgroups
- Datepicker

- ### Events

  - Swipe list items
  - Swipe page navigation
- Filterable widget
- Flipswitch widget

- ### Forms

  - Forms
  - Hide labels
  - Field containers
  - Forms disabled
  - Forms gallery

- ### Grids

  - Grids
  - Buttons in grids
  - Custom responsive grids
- Grouping and dividing content

- ### Icons

  - Icons
  - Grunticon loader

- ### Listview widget

  - Listview
  - Listview autocomplete
  - Listview autocomplete remote data
  - Listview autodividers linkbar
  - Listview autodividers selector
  - Listview Nested Listviews
  - Listview collapsible list items (flat)
  - Listview collapsible list items (indented)
  - Listview responsive grid
- Loader widget
- Navbar widget

- ### Navigation

  - Navigation
  - Linking pages
  - PHP redirect demo

- ### Pages

  - Pages
  - Single page
  - Multi-page template
  - Dialog page

- ### Panel widget

  - Panel
  - External panels
  - Fixed panels
  - Panels responsive
  - Custom panel style
  - Panel open on swipe
  - Panel external and internal

- ### Popup widget

  - Popup
  - Popup alignment
  - Popup arrow size
  - Dynamic popups
  - Popups with iframes
  - Popup image scaling
  - Popup outside multi-page
- Rangeslider widget
- Responsive Web Design

- ### Selectmenu widget

  - Selectmenu
  - Custom select menu
  - Custom select menu with filter

- ### Slider widget

  - Slider
  - Slider flip toggle switch
  - Slider tooltip

- ### Table widget

  - Table Column Toggle
  - Table Column Toggle demo
  - Table Column Toggle heading groups
  - Table Column Toggle options
  - Table Reflow
  - Table Reflow heading groups
  - Table Reflow stripes and strokes
  - Table Reflow custom styles
- Tabs widget
- Textinput widget

- ### Theming

  - Default theme
  - Classic theme

- ### Toolbar widget

  - Toolbar
  - Dynamic toolbars
  - External toolbars
  - Fixed toolbars
  - Fullscreen toolbars
  - Fixed external toolbars
  - Persistent toolbars
  - AJAX optimized toolbars
  - Form in toolbar
- Transitions

- ### 3rd party API demos

  - Backbone RequireJS
  - Google Maps geolocation
  - Google Maps list toggle