x-tag / togglegroup

Togglegroups are used to display a set of clickable option buttons, which can be either toggle in an independent or mutually exclusive manner.
1 stars 0 forks source link

Overview

Togglegroups are used to display a set of clickable option buttons, which can be either mutual-exclusively or independently toggled.

Usage

<x-togglegroup name="colour" group="colour">
     <x-toggle label="Red" value="red"></x-toggle>
     <x-toggle label="Green" value="blue"></x-toggle>
     <x-toggle label="Blue" value="green"></x-toggle>
</x-togglegroup>

Will produce a bar of three options, of which only one can be selected at a time. If a form with this toggle group is submitted, the selected

Attributes

name

Indicates the name to use for the group of buttons. This is the default keyname that will be submitted if submitted through a form.

The prescence of a name forces the toggles to act as radio toggles with a single name.

group

Indicates the name of the group of buttons. This allows the use of the shift key to select several buttons in one click when acting as checkbox toggles.

Accessors

options (getter only)

Retrieves an array of the DOM elements for each option in the toggle group.

Styling