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

react-dynamic-star

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dynamic-star

Single component to generate dynamic star svg

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
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

Package last updated on 16 Nov 2024

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