ngx-material-rating
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

ngx-material-rating

A Material Design rating component

Installation

Add the package to your application.

npm install --save ngx-material-rating

Demo

https://stackblitz.com/edit/ngx-material-rating-demo

Getting started

Import the range module to your application module.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgxMaterialRatingModule } from 'ngx-material-rating';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    FormsModule,
    NgxMaterialRatingModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Using the component

Add the component to your template and use the provided properties to suit your needs:

  • color: one of the valid value of ThemePalette
  • disabled: to disable the component
  • dense: to have less margin between stars
  • value: the rating value, can be used with [(ngModel)]
  • max: the maximum rating value

Check the demo for more examples.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.0156latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.0156
1.1.00
1.0.00

Package Sidebar

Install

npm i ngx-material-rating

Weekly Downloads

128

Version

2.0.0

License

MIT

Unpacked Size

55.5 kB

Total Files

16

Last publish

Collaborators

  • fvilers