# @types/react-star-rating-component

> TypeScript definitions for react-star-rating-component

Latest version **1.4.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-star-rating-component
pnpm add @types/react-star-rating-component
yarn add @types/react-star-rating-component
bun add @types/react-star-rating-component
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2023-11-07 |
| First published | 2018-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-star-rating-component
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-star-rating-component
- npm.io page: https://npm.io/package/@types/react-star-rating-component

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 1.4.4 (latest) — 2023-11-07
- 1.4.1 (ts3.9) — 2021-07-08
- 1.4.0 (ts2.8) — 2018-10-15
- 1.4.3 — 2023-10-18
- 1.4.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/react-star-rating-component`

# Summary
This package contains type definitions for react-star-rating-component (https://github.com/voronianski/react-star-rating-component#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-star-rating-component.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-star-rating-component/index.d.ts)
````ts
import * as React from "react";

interface StarRatingComponentProps {
    /** name of the radio input */
    name: string;

    /** the value of the star rating to display. i.e. the number of filled stars */
    value: number;

    /** number of icons in rating, default `5` */
    starCount?: number | undefined;

    onStarClick?: ((nextValue: number, prevValue: number, name: string) => void) | undefined;

    onStarHover?: ((nextValue: number, prevValue: number, name: string) => void) | undefined;

    onStarHoverOut?: ((nextValue: number, prevValue: number, name: string) => void) | undefined;

    /** render method for the full-star icon */
    renderStarIcon?:
        | ((
            nextValue: number,
            prevValue: number,
            name: string,
        ) => React.ReactNode | string)
        | undefined;

    /** render method for the half-star icon */
    renderStarIconHalf?:
        | ((
            nextValue: number,
            prevValue: number,
            name: string,
        ) => React.ReactNode | string)
        | undefined;

    /** color of selected icons */
    starColor?: string | undefined;

    /** color of non-selected icons */
    emptyStarColor?: string | undefined;

    /** is component available for editing, default `true` */
    editing?: boolean | undefined;
}

declare class StarRatingComponent extends React.Component<
    StarRatingComponentProps
> {}

export = StarRatingComponent;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Cody Sand](https://github.com/marpstar).

---
_Source: https://npm.io/package/@types/react-star-rating-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
