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

ButtonGroup

Expression Extends:

class ButtonGroup extends BaseFormField(BaseComponent(HTMLElement))

A ButtonGroup component that can be used as a selection form field.

See:

Example:

Markup
<coral-buttongroup></coral-buttongroup>
JS constructor
new Coral.ButtonGroup();

Static Member Summary

Static Public Members
public static

Returns ButtonGroup selection options.

Member Summary

Public Members
public

Whether this field is disabled or not.

public

The Collection Interface that allows interacting with the items that the component contains.

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

Returns the first selected button in the Button Group.

public

Returns an Array containing the selected buttons.

public

Selection mode of Button group

  • ButtonGroupSelectionModeEnum.NONE by default.

public

This field's current value.

  • "" by default.

public

Current selected values as submitted during form submission.

Method Summary

Public Methods
public

reset()

Inherited from BaseFormField#reset.

Static Public Members

public static selectionMode: ButtonGroupSelectionModeEnum: * source

Returns ButtonGroup selection options.

Public Members

public disabled: Boolean source

Whether this field is disabled or not.

  • false by default.
  • reflected

public items: SelectableCollection source

The Collection Interface that allows interacting with the items that the component contains.

  • read-only

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 selectedItem: HTMLElement source

Returns the first selected button in the Button Group. The value null is returned if no button is selected.

  • read-only

public selectedItems: Array<HTMLElement> source

Returns an Array containing the selected buttons.

  • read-only

public selectionMode: String source

Selection mode of Button group

  • ButtonGroupSelectionModeEnum.NONE by default.
  • reflected

public value: String source

This field's current value.

  • "" by default.

public values: Array<String> source

Current selected values as submitted during form submission.

Public Methods

public reset() source

Inherited from BaseFormField#reset.