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.
A lightweight, customizable, and accessible React library for creating elegant star rating systems.
Starify is a lightweight, customizable, and accessible React library for creating elegant star rating systems. Perfect for product reviews, blog comments, or any rating widget.
Install Starify via npm:
npm install starify
import { Star, StarRatingProvider } from "starify";
const App = () => (
<StarRatingProvider totalStars={5}>
<div>
{[...Array(5)].map((_, index) => (
<Star key={index} star={index + 1} size="2em" />
))}
</div>
</StarRatingProvider>
);
export default App;
Star
Component PropsProp | Type | Default | Description |
---|---|---|---|
star | Number | - | The star number in the sequence. |
size | String | '1em' | Font size for the star symbol. |
filledColor | String | 'gold' | Color of filled stars. |
unfilledColor | String | 'gray' | Color of unfilled stars. |
symbol | String | '★' | Symbol for stars. |
StarRatingProvider
PropsProp | Type | Default | Description |
---|---|---|---|
totalStars | Number | 5 | Total number of stars in the rating system. |
children | Node | - | React components wrapped by the provider. |
Starify is designed with accessibility in mind:
ArrowLeft
, ArrowRight
, and Enter
.Run tests and check coverage:
npm test -- --coverage
We welcome contributions! Please follow these steps:
git checkout -b feature/my-feature
git commit -m "Add my feature"
git push origin feature/my-feature
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A lightweight, customizable, and accessible React library for creating elegant star rating systems.
We found that starify 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.