Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-animated-rating
Advanced tools
react-animated-rating is an animated rating React component.
See react-animated-rating in action.
yarn add react-animated-rating
OR
npm install react-animated-rating
Add Rating
to your component:
import Rating from 'react-animated-rating';
<Rating />
Property | Type | Default | Description |
---|---|---|---|
animation | boolean | true | Whether icon animation is enabled or not. |
count | number | 5 | Number of icons. |
disabled | boolean | false | Whether icon is disabled or not. |
filled | number | 0 | Number of filled icons. |
icon | ReactNode | - | Embed SVG element as a React node. |
initialBounce | boolean | true - when disabled is false; false - when disabled is true | Whether bounce animation onload is enabled or not. The default value is determined by the disabled prop. |
size | string | "1.5em" | Font size of the SVG icon (Default width = 1em and height = 1em. Therefore, if size = 1.5em, then width = 24px and height = 24px). Does not work if the property icon is set. Only works with the default star icon. |
wrapperClassName | string | - | Wrapper class for the Rating component. |
Callback | Type | Description |
---|---|---|
onChange | function (value) {} | Returns the rating value when the icon is clicked. |
The CSS root variable --icon-color
depicts the color of the SVG icon.
To change its color, specify the wrapperClassName
and override the --icon-color
variable as shown below.
JSX
import Rating from 'react-animated-rating';
<Rating wrapperClassName="icon-red" />
CSS
.icon-red { --icon-color: red; }
FAQs
An animated rating React component
The npm package react-animated-rating receives a total of 6 weekly downloads. As such, react-animated-rating popularity was classified as not popular.
We found that react-animated-rating demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.