-
Notifications
You must be signed in to change notification settings - Fork 160
Radio Specification
Zdravko Kolev edited this page Feb 2, 2017
·
3 revisions
igx-radio
component renders set of radio buttons.
It is providing API for the most common use cases when it comes to select just one option from set of available options.
As a developer I want to be able to provide a way to customize and apply properties to a radio component.
<igx-radio *ngFor="let item of ['Foo', 'Bar', 'Baz']"
value="{{item}}" name="group"
[(ngModel)]="user.favouriteVarName">{{item}}
</igx-radio>
Attaching change event example:
<igx-radio
value="{{user.id}}"
tabIndex="50"
(change)="doAlert($event)"
(focus)="doAlert($event)"
(blur)="doAlert($event)"
[(ngModel)]="user.favouriteVarName">
{{user.name}}
</igx-radio>
I want to be able to allow the user to select one option from a set.
- Have multiple radio buttons.
- Be able to choose only one option.
- Handle events like change, focus, blur and checked.
Properties
-
disabled
- toggle element accessibility (enabled/disabled). -
checked
- set initial checked state of the element (true). Events
-
change
- triggered on change state change of the element. -
focus
- triggered on focus of the element (focus in). -
blur
- triggered when focus is moved away from the element.
Attributes
- aria-checked="checked" https://www.w3.org/TR/wai-aria/states_and_properties#aria-checked