Rating
The Rating component of our library is a user interface element used to display the rating that users have assigned to a product, service, or content. It usually appears as a series of stars or other symbols that you can customize, usually ranging from one star (lowest) to five stars (highest). Ratings provide valuable information about user satisfaction and preferences, helping developers and companies improve their products or services.
Information
This is a read-only component for the purpose of displaying the rating.
Usage
Basic usage
import {Rating} from 'rn-inkpad';
const MyComponent = () => {
return <Rating />;
};
Props
Name | Type | Default | Description |
---|---|---|---|
color | string | '#FFD700' | Rating icon color. |
icon | 'heart' | 'star' | star | Rating icon. |
rating | number | 3 | Rating. |
size | number | 35 | Rating icon size. |
style | StyleProp<ViewStyle> | Custom styles for your rating component. | |
total | number | 5 | Rating max value. |
Usage with props
import {Rating} from 'rn-inkpad';
const MyComponent = () => {
return <Rating color="#FF0000" icon="heart" rating={4.5} />;
};