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

@rei/cdr-rating

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rei/cdr-rating

REI Cedar Style Framework - Vue Component for Rating

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

CdrRating

For the most up-to-date information, see REI Cedar documentation.

Props

nametypedefault
ratingnumber0
Sets the rating values between 0 and 5. Required.
nametypedefault
countnumber0
Displays the total number of reviews.
nametypedefault
compactbooleanfalse
Hides the word 'Reviews' if true.
nametypedefault
hrefstringn/a
Sets the rating component (icons and text) to display inline and wraps them in an anchor tag.
nametypedefault
sizestring'medium'
Modifies the style variant for this component. Possible values: { ‘small’‘medium’‘large’ }

Installation

Resources are available within the CdrRating package:

  • Component: @rei/cdr-rating
  • Component styles: cdr-rating.css

To incorporate the required assets for a component, use the following steps:

1. Install using NPM

Install the CdrRating package using npm in your terminal:

Terminal

npm i @rei/cdr-rating

2. Import dependencies

main.js

// import your required CSS.
import "@rei/cdr-rating/dist/cdr-rating.css";

3. Add component to a template

local.vue

<template>
  ...
     <cdr-rating rating="4.2" count="77" />
  ...
</template>

<script>
import { CdrRating } from '@rei/cdr-rating;
export default {
  ...
  components: {
     CdrRating  
  }
}
</script>

Usage

By default the CdrRating component renders the icons in medium size (24px) with the total number of reviews.

Rating Values

  • The count for reviews will always be visible
  • Ratings are rounded to the nearest .25 because icons are represented in 25% increments
  • Screen reader text is provided which reads, “Rated [ rounded ] out of 5 with [ count ] reviews”

FAQs

Package last updated on 01 Apr 2019

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