Radio

Radio

Angular Bootstrap Radio button is a component used for allowing a user to make a single choice among many options, while Checkboxes are for selecting multiple options.

Single Radio Example

image info

html
<CDBRadio value="Choice 1" fill="#eb7434" colorfill="#eb7434"></CDBRadio>
<CDBRadio value="Choice 2" fill="green" colorfill="red"></CDBRadio>
<CDBRadio value="Choice 3" fill="#000000" colorfill="#000000"></CDBRadio>

CDBRadio

image info

html
<CDBRadioGroup fill="#eb7434" colorfill="#eb7434" [answers]="['Choice 1', 'Choice 2' , 'Choice 3' , 'Choice 4' ]"></CDBRadioGroup>

API

Here in this section you will find information about required modules and available inputs, outputs, methods and events of this component.

Contrast Radio Bootstrap Modules used

import {RadioModule } from 'cdbangular';

API Reference: Contrast Radio Inputs

The table below shows the possible input of the Radio component.

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
fillString#455ff5Sets the color of the unselected radio buttonfill="#000000"
colorfillStringSets the color of the selected radio buttoncolorFill="#000000"
valueStringThe value of the input elementvalue="Choice1"

API Reference: Contrast Radio Group Inputs

The table below shows the configuration options of the CDBRadioGroup component.

NameTypeDefaultDescriptionExample
classNameStringAdds custom classesclass="myClass"
fillString#455ff5Sets the color of the unselected radio buttonfill="#000000"
colorfillStringSets the color of the selected radio buttoncolorFill="#000000"
answersArray[]The list of values of the input elementanswers=[choice1, choice2, choice3]