Search...

Rating

Contrast Angular Bootstrap Rating

Contrast Angular Bootstrap Rating is made up of interactive icons, which allow users to share their experience or thoughts on a product or service. It helps to gain insights from a product users' feedback in order to improve the product.

Importing the Contrast Angular Bootstrap Rating Module

To use the Contrast Angular Bootstrap Rating component in your project you need to import RatingModule.

ts
import {RatingModule } from 'cdbangular';

Default Rating

Angular Bootstrap Rating Default

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

API Reference: Contrast Angular Bootstrap Rating Props

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Rating component. You will find out what these props do, their default values, and how you would use them in your code.

The table below lists other prop options of the CDBRating.

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}

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.

ad-banner