You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-22
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,19 @@
1
1
# react-native-rating-element
2
2
3
3
A simple rating library for react native supporting:
4
-
***decimal points** like 3.7, 4.2 etc,
5
-
***direction aware** icons (like you can pass direction as “column” or “row-reverse”),
6
-
***custom icon set** from Ionicons,
7
-
* and **interact and record rating** given by users.
4
+
5
+
-**decimal points** like 3.7, 4.2 etc,
6
+
-**direction aware** icons (like you can pass direction as “column” or “row-reverse”),
7
+
-**custom icon set** from Ionicons,
8
+
-**custom images** (You can add any suitable image as per your wish),
9
+
- and **interact and record rating** given by users.
8
10
9
11
> Please note: This package depends on [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons#installation). Please install and configure it before using this package. It is simple to install - First, install the package via `npm` and then link it using `react-native link`.
|`rated`| 0 | number | Represents Initial value for the rating. |
61
-
|`totalCount`| 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount`|
62
-
|`ratingColor`| #b5121b | string (color) | Pass in a custom color to fill-color the rating icon. |
63
-
|`ratingBackgroundColor`| #c8c7c8 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
64
-
|`size`| 24 | number | Pass in a custom font size for the icon |
65
-
|`icon`| 'ios-star' | string | Pass in a custom text for the icon. For ex. 'beer', 'bulb'. These icons are imported from package [react-native-vector-icons](https://oblador.github.io/react-native-vector-icons/). Please Note: For now this package only support Ionicons |
66
-
|`marginBetweenRatingIcon`| 1 | number | Pass in custom number to manage space or margin between the rating icons. |
67
-
|`onStarTap`| - | func | On press of star icon by user, this function will be invoked with `position` paramter. For ex. when user taps on 4 rating, this function will be invoked and in `position` parameter you will get value 4. |
68
-
|`readonly`| false | bool | If passed true, onPress event won't be fired. |
69
-
|`direction`| 'row' | string | Pass any value from `[ "row", "row-reverse", "column", "column-reverse"]`. |
|`type`|`icon`| string | Be default the value is set to "icon" type. If you want custom images, then pass `custom` as prop value. <br />In case of `custom`, Make sure to pass `selectedIconImage` and `emptyIconImage`. ||
77
+
|`rated`| 0 | number | Represents Initial value for the rating. |
78
+
|`totalCount`| 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount`|
79
+
|`ratingColor`| #b5121b | string (color) | Pass in a custom color to fill-color the rating icon. |
80
+
|`ratingBackgroundColor`| #c8c7c8 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
81
+
|`size`| 24 | number | Pass in a custom font size for the icon |
82
+
|`icon`| 'ios-star' | string | Pass in a custom text for the icon. For ex. 'beer', 'bulb'. These icons are imported from package [react-native-vector-icons](https://oblador.github.io/react-native-vector-icons/). Please Note: For now this package only support Ionicons |
83
+
|`marginBetweenRatingIcon`| 1 | number | Pass in custom number to manage space or margin between the rating icons. |
84
+
|`onIconTap`| - | func | On press of star icon by user, this function will be invoked with `position` paramter. For ex. when user taps on 4 rating, this function will be invoked and in `position` parameter you will get value 4. |
85
+
|`readonly`| false | bool | If passed true, onPress event won't be fired. |
86
+
|`direction`| 'row' | string | Pass any value from `[ "row", "row-reverse", "column", "column-reverse"]`. |
87
+
|`selectedIconImage`| - | image path (node) | Pass in custom path for selected icon. For ex. `selectedIconImage={require('../pathToImage/image.png}`. |
88
+
|`emptyIconImage`| - | image path (node) | Pass in custom path for selected icon. For ex. `emptyIconImage={require('../pathToImage/image.png}`. |
0 commit comments