Reference Source
import {Checkbox} from '@adobe/coral-spectrum'
public class | source

Checkbox

Expression Extends:

class Checkbox extends BaseFormField(BaseComponent(HTMLElement))

A Checkbox component to be used as a form field.

See:

Example:

Markup
<coral-checkbox></coral-checkbox>
JS constructor
new Coral.Checkbox();

Member Summary

Public Members
public

Checked state for the checkbox.

public

Whether this field is disabled or not.

public

Indicates that the checkbox is neither on nor off.

public

The checkbox's label element.

  • content-zone

public

Inherited from BaseFormField#labelled.

public

Inherited from BaseFormField#labelledBy.

public

Name used to submit the data in a form.

public

Whether this field is readOnly or not.

public

Whether this field is required or not.

public
public

The value that will be submitted when the checkbox is checked.

Method Summary

Public Methods
public

clear()

Inherited from BaseFormField#clear.

public

reset()

Inherited from BaseFormField#reset.

Public Members

public checked: Boolean source

Checked state for the checkbox.

  • false by default.
  • reflected

Emit:

change

public disabled: Boolean source

Whether this field is disabled or not.

  • false by default.
  • reflected

public indeterminate: Boolean source

Indicates that the checkbox is neither on nor off.

  • false by default.
  • reflected

public label: CheckboxLabel source

The checkbox's label element.

  • content-zone

public labelled: * source

Inherited from BaseFormField#labelled.

public labelledBy: * source

Inherited from BaseFormField#labelledBy.

public name: String source

Name used to submit the data in a form.

  • "" by default.
  • reflected

public readOnly: Boolean source

Whether this field is readOnly or not. Indicating that the user cannot modify the value of the control.

  • false by default.
  • reflected

public required: Boolean source

Whether this field is required or not.

  • false by default.
  • reflected

public trackingElement: * source

Inherited from BaseComponent#trackingElement.

public value: String source

The value that will be submitted when the checkbox is checked. Changing this value will not trigger an event.

  • "on" by default.

Public Methods

public clear() source

Inherited from BaseFormField#clear.

public reset() source

Inherited from BaseFormField#reset.