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

beauty-stars

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beauty-stars

A simple and beauty star rating for React projects

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Welcome to beauty-stars 👋

Coverage Status npm version License: MIT Twitter: leocardoso94_

A simple and beauty star rating for React projects

Install

npm install --save beauty-stars
// or
yarn add beauty-stars

Usage

import React, { Component } from "react";

import BeautyStars from "beauty-stars";

export default class App extends Component {
  state = { value: 0 };
  render() {
    return (
      <BeautyStars
        value={this.state.value}
        onChange={value => this.setState({ value })}
      />
    );
  }
}

API

This a list of props that you can pass down to the component:

PropertyDescriptionDefault valuetype
maxStarsHow many total stars you want5number
valueSet rating value0number
editableEnable edittrueboolean
inactiveColorColor of inactive star (this supports any CSS valid value)#121621string
activeColorColor of selected or active star#FFED76string
sizeSize of stars (in px)36pxstring
onChange(newValue)Will be invoked any time the rating is changedundefinedfunction
hideInactiveWill hide inactive starsfalseboolean
gapSets the gaps (gutters) between stars16pxstring

Author

👤 Leocardoso94

Show your support

Give a ⭐️ if this project helped you!

FAQs

Package last updated on 14 Feb 2020

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