Rating

Rating

Angular Bootstrap 5-star rating plugin can be used to allow the users to share their opinion about the product, documentation page, photo and more.

Visit API by scrolling down for all available inputs.

Examples

Default Rating example.

image info

html
<CDBRating [iconRegular]=true></CDBRating>
<CDBRating [iconFaces]=true fillClass='black-text' [iconRegular]=true></CDBRating>
<CDBRating [feedback]=true></CDBRating>

API

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

Contrast Rating Bootstrap Modules used

import {RatingModule } from 'cdbangular';

API Reference: Contrast Rating Inputs

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

NameTypeDefaultDescriptionExample
containerClassStringAdds custom classes to the containercontainerClass="myClass"
dataArray[{tooltip: 'Very Bad'}, {tooltip: 'Poor'}, {tooltip: 'Ok'}, {tooltip: 'Good'},{tooltip: 'Excellent'}]Sets custom data of icon property.data=[{tooltip: 'Very Bad'}, {tooltip: 'Poor'}, {tooltip: 'Ok'}, {tooltip: 'Good'},{tooltip: 'Excellent'}]
feedbackBooleanfalseIf set to true, clicking a star will trigger a popover with a textareafeedback=true
fillClassStringfiveStarsSets custom classes for filled iconsfillClass="red-text"
iconClassStringSets default icon's classesiconClass="blue-text"
iconFacesBooleanfalseChanges icon star for icon faceiconFaces=true
iconSizeString1xSets size of iconsiconSize="2x"
iconRegularBooleanfalseSets regular style of iconsiconRegular=true
submitHandlerfunctionReturns feedback form valuesummitHandler={handleSubmit}