# Checkboxes ## Introduction Let users select one or more options. ## Guidance Find out when to use the checkboxes component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/checkboxes). ## Quick start examples ### Checkboxes [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/checkboxes/preview) #### Markup
Name | Type | Required | Description |
---|---|---|---|
fieldset | object | No | Arguments for the fieldset component (e.g. legend). See fieldset component. |
hint | object | No | Arguments for the hint component (e.g. text). See hint component. |
errorMessage | object | No | Arguments for the errorMessage component (e.g. text). See errorMessage component. |
idPrefix | string | No | String to prefix id for each checkbox item if no id is specified on each item. If`idPrefix` is not passed, fallback to using the name attribute instead. |
name | string | Yes | Name attribute for each checkbox item. |
items | array | Yes | Array of checkbox items objects. |
items.{}.text (or) items.{}.html | string | Yes | Text or HTML to use within each checkbox item label. If `html` is provided, the `text` argument will be ignored. |
items.{}.id | string | No | Specific id attribute for the checkbox item. If ommited, then `idPrefix` string will be applied. |
items.{}.name | string | Yes | Specific name for the checkbox item. If ommited, then component global `name` string will be applied. |
items.{}.value | string | Yes | Value for the checkbox input. |
items.{}.label | object | No | Provide additional attributes and classes to each checkbox item label. See [label](../label/README.md#component-arguments) component for more details. |
items.{}.hint | object | No | Provide optional hint to each checkbox item. See `hint` component for more details. |
items.{}.checked | boolean | No | If true, checkbox will be checked. |
items.{}.conditional | boolean | No | If true, content provided will be revealed when the item is checked. |
items.{}.conditional.html | boolean | No | Provide content for the conditional reveal. |
items.{}.disabled | boolean | No | If true, checkbox will be disabled. |
classes | string | No | Optional additional classes to add to the checkboxes container. |
attributes | object | No | Any extra HTML attributes (for example data attributes) to add to the checkboxes container. |