Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
beauty-stars
Advanced tools
A simple and beauty star rating for React projects
npm install --save beauty-stars
// or
yarn add beauty-stars
import React, { Component } from "react";
import BeautyStars from "beauty-stars";
export default class App extends Component {
state = { value: 0 };
render() {
return (
<BeautyStars
value={this.state.value}
onChange={value => this.setState({ value })}
/>
);
}
}
This a list of props that you can pass down to the component:
Property | Description | Default value | type |
---|---|---|---|
maxStars | How many total stars you want | 5 | number |
value | Set rating value | 0 | number |
editable | Enable edit | true | boolean |
inactiveColor | Color of inactive star (this supports any CSS valid value) | #121621 | string |
activeColor | Color of selected or active star | #FFED76 | string |
size | Size of stars (in px) | 36px | string |
onChange(newValue) | Will be invoked any time the rating is changed | undefined | function |
hideInactive | Will hide inactive stars | false | boolean |
gap | Sets the gaps (gutters) between stars | 16px | string |
👤 Leocardoso94
Give a ⭐️ if this project helped you!
FAQs
A simple and beauty star rating for React projects
We found that beauty-stars 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.