Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-stock-star-rating
Advanced tools
Readme
iOS | Android | Web | Expo |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
$ npm install react-native-stock-star-rating
OR
$ yarn add react-native-stock-star-rating
import { Rating } from 'react-native-stock-star-rating'
const App = () => {
return(
<Rating stars={4.7} maxStars={5} size={25} />
)
};
Star Rating Demo
For Live Demo
(Expo Snack)
Name | Type | Description | Default |
---|---|---|---|
maxStars | Number | Number of stars to show (Optional) | 5 |
stars | Number | Filled stars to show or value of rating | 0 |
size | Number | Size of the star (Optional) | 25 |
color | String | Use the color you want to give to the rating stars (Optional) | #FFDF00 |
bordered | boolean | Set to true if you want bordered stars (Optional) | false |
If you want to provide star rating input to capture the rating given by users, you can use this as below:
import { RatingInput } from 'react-native-stock-star-rating'
const App = () => {
const [rating,setRating] = React.useState(0);
return(
<RatingInput
rating={rating}
setRating={setRating}
size={50}
maxStars={5}
bordered={false}
/>
)
};
Star Rating Input Demo
Name | Type | Description | Default |
---|---|---|---|
rating | Number | State variable to store the rating (Required) | 0 |
setRating | Function | Function to update the rating state variable (Required) | - |
maxStars | Number | Number of stars to show (Optional) | 5 |
stars | Number | Filled stars to show or value of rating | 0 |
size | Number | Size of the star (Optional) | 25 |
color | String | Use the color you want to give to the rating stars (Optional) | #FFDF00 |
bordered | boolean | Set to true if you want bordered stars (Optional) | false |
onRating | Function | Callback function to execute after rating input is given (Optional) | - |
For Live Demo
(Expo Snack)
FAQs
☆ React Native stock star rating component with zero dependencies
The npm package react-native-stock-star-rating receives a total of 53 weekly downloads. As such, react-native-stock-star-rating popularity was classified as not popular.
We found that react-native-stock-star-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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.