Checkbox

Examples

check me
<nxt-checkbox>check me</nxt-checkbox>
check me
<nxt-checkbox indeterminate>check me</nxt-checkbox>
check me
<nxt-checkbox checked>check me</nxt-checkbox>
check me
check me
<nxt-checkbox disabled checked>check me</nxt-checkbox>
<br />
<nxt-checkbox disabled>check me</nxt-checkbox>
check me
check me
<nxt-checkbox size="large">check me</nxt-checkbox>
<br />
<nxt-checkbox size="small">check me</nxt-checkbox>

import '@nxt/ndbx-components/checkbox';

NxtCheckbox

This is a checkbox component. Checkboxes can have three states: checked, unchecked and indeterminate.

Tag: nxt-checkbox

Slots

Name Description
default

The label of the checkbox.

Properties

Property Attribute Type Default Description
checked checked boolean false

Whether the checkbox is checked.

disabled disabled boolean false

Disables the checkbox.

indeterminate indeterminate boolean false

Sets the checkbox to indeterminate.

invalid invalid boolean false

Sets the checkbox to invalid.

size size 'small' | 'large' 'small'

The size of the checkbox.

value value string ''

The value of the checkbox.