React Rating Component with Float Number Support
npm install react-rating-floatA modern React component for displaying star ratings with floating-point number support. Built with TypeScript and Vite.
``bash`
npm install react-rating-float
`tsx
import { ReactRatingFloat } from 'react-rating-float';
function App() {
return
}
`
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| rate | number | 0.5 | The rating value to display |total
| | number | 1 | Total number of stars |raterDim
| | number | 20 | Diameter of each star in pixels |activeColor
| | string | #FFB600 | Color for filled portion of stars |inactiveColor
| | string | #bebebe | Color for empty portion of stars |raterBg
| | string | #fff | Background color for stars |
tsx
`$3
`tsx
rate={4.2}
total={5}
activeColor="#ff6b6b"
inactiveColor="#ddd"
raterDim={30}
/>
`Development
`bash
Install dependencies
npm installRun development server with example
npm run devBuild library
npm run buildRun linting
npm run lintType check
npm run type-check
``MIT