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

dw-neit-rc-rate

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dw-neit-rc-rate

React Star Rate Component

  • 2.13.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

dw-neit-rc-rate

React Rate Component

NPM version npm download build status Codecov bundle size dumi

Screenshots

Changelog

  • CHANGELOG

Development

npm install
npm start

Example

install

dw-neit-rc-rate

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import Rate from 'dw-neit-rc-rate';

ReactDOM.render(
  <Rate />,
  document.getElementById('root')
)

with styled-components

import React from 'react';
import ReactDOM from 'react-dom';
import Rate from 'dw-neit-rc-rate';
import styled from 'styled-components';

const StyledRate = styled(Rate)`
  &.dw-neit-rc-rate {
    font-size: ${({ size }) => size}px;
  }
`

ReactDOM.render(
  <StyledRate size="24" />,
  document.getElementById('root')
)

API

props

nametypedefaultdescription
countnumber5Star numbers
valuenumber-Controlled value
defaultValuenumber0Initial value
allowHalfbooleanfalseSupport half star
allowClearbooleantrueReset when click again
styleobject{}
onChangefunction(value) => {}onChange will be triggered when click
onHoverChangefunction(value) => {}onHoverChange will be triggered when hover on stars
characterReactNode | (props) => ReactNodeThe each character of rate
disabledbooleanfalse
directionstringltrThe direction of rate

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

dw-neit-rc-rate is released under the MIT license.

Keywords

FAQs

Package last updated on 19 Aug 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