Socket
Socket
Sign inDemoInstall

react-dynamic-star

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-dynamic-star

Single component to generate dynamic star svg


Version published
Weekly downloads
80
decreased by-56.76%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React Dynamic Star

A Highly Customizable, easy-to-use elegant stars rating component. This component is a port of an open-source component made in vue, you can access the repo in Vue Star Rating.

Demo

Full

Outlined

Edit react-dynamic-star-example

Usage

  1. Install via npm or yarn
yarn add react-dynamic-star

npm install react-dynamic-star
  1. Import in project
import { DynamicStar } from 'react-dynamic-star';
  1. Use
const App = () => { 

    return (
        <div>
            <DynamicStar rating={5} />
        </div>
    )
}

Props

PropertyTypeDescriptionDefault
rating*NumberA number between 0.0-totalStars that will determine the fullness of the stars rating polygons
outlined?Boolean, StringUse only outlined, the stroke color will use the fullStarColor, pass the color for he the outlined color will use.
outlineWidth?NumberThe width for outline
sharpnessStar?NumberDefine the sharpness/fatness of a star2.5
totalStars?NumberDefine total of stars5
width?NumberDefine width of a star100
height?NumberDefine height of a star100
emptyStarColor?StringDefine empty color when star is not filledtransparent
fullStarColor?StringDefine full star color when star is filled#FFBC00

Keywords

FAQs

Last updated on 10 Feb 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc