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

stars-rating-react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stars-rating-react-hooks

Stars rating with react-hooks, flexible and customizable component (headless)

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

stars-rating-react-hooks ⭐️

stars-rating-react-hooks

Customizable react component for rating stars

  • Define config object
  • import { StarsRating } from "stars-rating-react-hooks"
  • Start using <StarsRating config={config} />

NPM

Install

npm install --save stars-rating-react-hooks

Usage (Basic)

stars-rating-react-hooks
import React from 'react'

import { StarsRating } from "stars-rating-react-hooks";

function Example() {

  const config = {
    number: 5,
    value: 4.5,
    renderFull: (
      <img src="https://img.icons8.com/ios-filled/50/000000/star--v1.png" />
    ),
    renderEmpty: (
      <img src="https://img.icons8.com/ios/50/000000/star--v1.png" />
    ),
    renderHalf: (
      <img src="https://img.icons8.com/ios-filled/50/000000/star-half-empty.png" />
    )
  };

  
  
    return  <StarsRating config={config} />
  
}

export default Example

More info on prop getters

Demo

Basic demo

License

MIT © 07harish

Keywords

FAQs

Package last updated on 13 Mar 2021

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