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.
@gietmanic/react-star-rating
Advanced tools
A simple and customizable star rating component for React
A simple, customizable, and accessible star rating component for React applications.
npm install @gietmanic/react-star-rating
# or
yarn add @gietmanic/react-star-rating
# or
pnpm add @gietmanic/react-star-rating
import { StarRating } from '@gietmanic/react-star-rating';
function App() {
return (
<StarRating
onChange={(rating) => console.log('New rating:', rating)}
initialRating={3}
size={32}
activeColor="#FBBF24"
inactiveColor="#D1D5DB"
minStars={1}
maxStars={10}
showMinStarsText={true}
showRatingText={true}
/>
);
}
Prop | Type | Default | Description |
---|---|---|---|
onChange | (rating: number) => void | undefined | Callback function called when rating changes |
initialRating | number | 0 | Initial rating value |
size | number | 32 | Size of stars in pixels |
activeColor | string | '#FBBF24' | Color of active (filled) stars |
inactiveColor | string | '#D1D5DB' | Color of inactive stars |
minStars | number | 1 | Minimum number of stars required |
maxStars | number | 5 | Maximum number of stars available |
showMinStarsText | boolean | true | Show/hide minimum stars requirement text |
showRatingText | boolean | true | Show/hide current rating text |
<StarRating onChange={(rating) => console.log(rating)} />
<StarRating minStars={2} maxStars={10} />
<StarRating
activeColor="#FFD700"
inactiveColor="#C0C0C0"
/>
<StarRating
showMinStarsText={false}
showRatingText={false}
/>
<StarRating
onChange={(rating) => console.log('New rating:', rating)}
initialRating={3}
size={32}
activeColor="#FBBF24"
inactiveColor="#D1D5DB"
minStars={1}
maxStars={10}
showMinStarsText={true}
showRatingText={true}
/>
Contributions are welcome!
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)FAQs
A simple and customizable star rating component for React
The npm package @gietmanic/react-star-rating receives a total of 5 weekly downloads. As such, @gietmanic/react-star-rating popularity was classified as not popular.
We found that @gietmanic/react-star-rating demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.