Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-native-star-svg-rating
Advanced tools
A customizable, animated star rating component for React Native. Compatible with iOS, Android and Web. Written in Typescript.
npm install react-native-star-svg-rating --save
or yarn add react-native-star-svg-rating
import StarRating from 'react-native-star-svg-rating';
const Example = () => {
const [rating, setRating] = useState(0);
return (
<StarRating
rating={rating}
onChange={setRating}
/>
);
};
Name | Type | Default | Description |
---|---|---|---|
rating | number | REQUIRED | Rating Value. Should be between 0 and maxStars |
onChange | (number) => void | REQUIRED | called when rating changes |
maxStars | number | 5 | number of stars |
starSize | number | 32 | star size |
color | string | "#fdd835" | star color |
borderColor | string | same as color | border star color |
emptyColor | string | "#404040" | empty star color |
emptyBorderColor | string | same as emptyColor | empty border star color |
style | object | undefined | optional style |
starStyle | object | undefined | optional star style |
enableHalfStar | boolean | true | enable or disable display of half stars |
enableSwiping | boolean | true | enable or disable swiping |
onRatingStart | () => void | undefined | called when user starts interaction |
onRatingEnd | () => void | undefined | called when user ends interaction |
animationConfig | see AnimationConfig | see AnimationConfig | animation configuration object |
StarIconComponent | (props: { size: number; color: string; borderColor: string; type: "full" | "half" | "empty"; }) => JSX.Element | StarIcon | Icon component |
Name | Type | Default | Description |
---|---|---|---|
scale | number | 1.2 | star animation scale value |
duration | number | 300 | animation duration |
delay | number | 300 | animation delay when interaction has ended |
easing | (number) => number | Easing.elastic(2) | animation easing function |
A StarRatingDisplay
component without any interaction functionality is exported as well.
FAQs
A star rating widget for react native
The npm package react-native-star-svg-rating receives a total of 6 weekly downloads. As such, react-native-star-svg-rating popularity was classified as not popular.
We found that react-native-star-svg-rating demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.