Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

star-rating-web-component

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

star-rating-web-component

Star Rating web component. Framework-independent: use with Ionic, Angular, Vue, React, vanilla Javascript, etc. You can choose any color (default is gold), any font size (default is 25px), and any number of stars (default is 5). Created with Stencil.js.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Star Rating

Star Rating web component. Framework-independent: use with Ionic, Angular, Vue, React, vanilla Javascript, etc. You can choose any color (default is gold), any font size (default is 25px), and any number of stars (default is 5). Created with Stencil.js.

Installation

npm install star-rating-web-component --save

Setup after installation depends on which framework you are using. See the Setup Page on Github for details.

Sample Usage

The following produces a rating component with five gold stars of size 25px:

<star-rating (rated)="newRating($event)"></star-rating>

The following produces a rating component with four blue stars of size 50px, and starts with a rating of 3.

<star-rating color="blue" 
             stars="4" 
             size="50" 
             rating="3" 
             (rated)="newRating($event)">
</star-rating>

Sample Typescript rating handler:

newRating(ratingEvent: CustomEvent) {
    let rating: number = ratingEvent.detail;
    console.log('New rating: ',rating);
}

Keywords

FAQs

Package last updated on 23 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc