npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sreyaj/ng-star-rating

v2.0.0

Published

A Simple and Customizable SVG based Star Rating Component For Angular

Downloads

123

Readme

SVG Based Angular Star Rating Component

Simple Rating Component for your next Angular Project. Very simple to setup and use and comes with a lot of customizations.

User Ratings Card

Features

  • Simple and Easy to Setup
  • Ease to use
  • SVG based super light
  • Material Spec Icons for Standard Feel
  • Zero Dependencies
  • Supports half-star rating
  • Supports Rating Mode and also Display only Mode

How to Use the Component

Install the package using the command:

npm i @sreyaj/ng-star-rating

Import the StarRatingModule into your module

import { StarRatingModule } from '@sreyaj/ng-star-rating';
@NgModule({
  ...
  imports: [StarRatingModule],
  ...
})
export class AppModule {}

Now you can use the component inside your application

<ngx-star-rating></ngx-star-rating>

You can now customize it with the following attributes

Eg with few options:

<ngx-star-rating [total]="5" [filledColor]="'#ff0000'"></ngx-star-rating>

Customizations

| Feature | Description | Attribute | Type | Default | | ------------- | ------------------------------------------------------------ | ----------- | ---------------- | ------- | | No of Stars | You can change the total rating number | total | number | 5 | | Display Mode | Star Rating component can be used to just display the rating | readonly | boolean | false | | Type of Stars | The component supports filled stars and hollow stars design | type | filled or hollow | hollow | | Rating Color | The color for the filled Stars | filledColor | string | #3db700 | | Rating Color | The color for the empty Stars | emptyColor | string | #e0e0e0 | | Rating Event | Rating Emitted when user clicks on the rating | rated | number | nil |

Feel free to open Issues and Pull Requests