A bar of buttons that behave like radio buttons.
// example.tsclass Example { selected: number = 0;} Copy
// example.tsclass Example { selected: number = 0;}
<!-- example.html --><selection-bar data.bind="selected"> <selection-bar-option data.bind="0" value="Foo"></selection-bar-option> <selection-bar-option data.bind="1" value="Bar"></selection-bar-option></selection-bar> Copy
<!-- example.html --><selection-bar data.bind="selected"> <selection-bar-option data.bind="0" value="Foo"></selection-bar-option> <selection-bar-option data.bind="1" value="Bar"></selection-bar-option></selection-bar>
Selection logic can also be implemented manually, if needed:
<selection-bar> <selection-bar-option selected.bind="selected === 0" action.call="selected = 0" value="Foo"> </selection-bar-option> <selection-bar-option selected.bind="selected === 1" action.call="selected = 1" value="Bar"> </selection-bar-option></selection-bar> Copy
<selection-bar> <selection-bar-option selected.bind="selected === 0" action.call="selected = 0" value="Foo"> </selection-bar-option> <selection-bar-option selected.bind="selected === 1" action.call="selected = 1" value="Bar"> </selection-bar-option></selection-bar>
The data value of the selected SelectionBarOption.
A bar of buttons that behave like radio buttons.
Example
Example
Selection logic can also be implemented manually, if needed: