# jQuery Mobile

Navigation Home

# Checkboxes API

Checkboxes are used to provide a list of options where more than one can be selected. Jump to section

## Basic markup

To create a single checkbox, add an `input` with a `type="checkbox"` attribute and a corresponding `label`. If the `input` isn't wrapped in its corresponding `label`, be sure to set the `for` attribute of the `label` to match the `id` of the `input` so they are semantically associated.

Check me

## Mini size

For a more compact version that is useful in toolbars and tight spaces, add the `data-mini="true"` attribute to the element to create a mini version.

I agree

## Vertical group

Typically, there are multiple checkboxes listed under a question title. To visually integrate multiple checkboxes into a grouped button set, the framework will automatically remove all margins between buttons and round only the top and bottom corners of the set if there is a `data-role="controlgroup"` attribute on the `fieldset`.

Vertical: One Two Three

## Horizontal group

Checkboxes can also be used for grouped button sets where more than one button can be selected at once, such as the bold, italic and underline button group seen in word processors. To make a horizontal button set, add the `data-type="horizontal"` to the `fieldset`.

Horizontal: One Two Three

## Icon position

To swap the position of the check icon from the default position on the left, add the `data-iconpos="right"` attribute to the fieldset to create a mini version.

Horizontal, mini sized: One Two Three

## Theme

To set the theme, add the `data-theme` attribute on the `fieldset` to the individual checkbox inputs.

Swatch A: One Two Three