### `<w-checkbox>` API

#### Properties

| Name | Type | Default | Summary |
|-|-|-|-|
| _computedInvalid (JS only) | `boolean` | `-` | Computed invalid state: combines own invalid with group invalid |
| blur (JS only) | `blur() => void` | `-` | - |
| checkValidity (JS only) | `checkValidity() => boolean` | `-` | Checks whether the checkbox passes constraint validation |
| checked | `boolean` | `false` | Whether the checkbox is checked. |
| click (JS only) | `click() => void` | `-` | - |
| disabled | `boolean` | `false` | Whether the checkbox is disabled. |
| focus (JS only) | `focus(options?: FocusOptions) => void` | `-` | - |
| indeterminate | `boolean` | `false` | Whether the checkbox is visually indeterminate. |
| input (JS only) | `HTMLInputElement` | `-` | - |
| invalid | `boolean` | `false` | Whether the checkbox is visually invalid. |
| name | `string \| undefined` | `-` | The name of the checkbox. |
| reportValidity (JS only) | `reportValidity() => boolean` | `-` | Checks validity and shows the browser's validation message if invalid |
| required | `boolean` | `false` | Whether the checkbox must be checked before form submission. |
| resetFormControl (JS only) | `resetFormControl() => void` | `-` | - |
| shadowRootOptions (JS only) | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
| validationMessage (JS only) | `string` | `-` | Returns the validation message if the checkbox is invalid, otherwise an empty string |
| validity (JS only) | `ValidityState` | `-` | Returns the validity state of the checkbox |
| value | `string \| null` | `null` | The value submitted when the checkbox is checked. |

#### Property Details

##### _computedInvalid (JS only)

Computed invalid state: combines own invalid with group invalid

- Type: `boolean`
- Default: `-`

##### blur (JS only)



- Type: `blur() => void`
- Default: `-`

##### checkValidity (JS only)

Checks whether the checkbox passes constraint validation

- Type: `checkValidity() => boolean`
- Default: `-`

##### checked

Whether the checkbox is checked.

Checked checkboxes submit their value with form data. The property is reflected to the `checked` attribute.

- Type: `boolean`
- Default: `false`

##### click (JS only)



- Type: `click() => void`
- Default: `-`

##### disabled

Whether the checkbox is disabled.

Disabled checkboxes cannot be focused, changed, or submitted with form data.

- Type: `boolean`
- Default: `false`

##### focus (JS only)



- Type: `focus(options?: FocusOptions) => void`
- Default: `-`

##### indeterminate

Whether the checkbox is visually indeterminate.

Use this for parent options that represent a mixed set of child selections. Clicking the checkbox clears the indeterminate state and sets the checkbox to checked.

- Type: `boolean`
- Default: `false`

##### input (JS only)



- Type: `HTMLInputElement`
- Default: `-`

##### invalid

Whether the checkbox is visually invalid.

Use this to show an externally managed validation error. Required validation also sets the invalid state after the user interacts with the checkbox or tries to submit the form.

- Type: `boolean`
- Default: `false`

##### name

The name of the checkbox.

When the checkbox is checked and belongs to a form, this name is submitted with the checkbox value. If the checkbox is inside a `w-checkbox-group` with a name, the group name is used when the checkbox does not have its own name.

- Type: `string | undefined`
- Default: `-`

##### reportValidity (JS only)

Checks validity and shows the browser's validation message if invalid

- Type: `reportValidity() => boolean`
- Default: `-`

##### required

Whether the checkbox must be checked before form submission.

A required checkbox is invalid until it is checked. For requiring at least one option in a set, use `required` on `w-checkbox-group`.

- Type: `boolean`
- Default: `false`

##### resetFormControl (JS only)



- Type: `resetFormControl() => void`
- Default: `-`

##### shadowRootOptions (JS only)



- Type: `object`
- Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`

##### validationMessage (JS only)

Returns the validation message if the checkbox is invalid, otherwise an empty string

- Type: `string`
- Default: `-`

##### validity (JS only)

Returns the validity state of the checkbox

- Type: `ValidityState`
- Default: `-`

##### value

The value submitted when the checkbox is checked.

If no value attribute is set, the checkbox defaults to `on`. Unchecked and disabled checkboxes do not submit a value.

- Type: `string | null`
- Default: `null`

