a simple rating component

Overview

rn-rating-component

A Simple react-native rating component.

npm

Installation

Install rn-rating-component and its dependeices with npm

  npm install --save rn-rating-component

or

  yarn add --save rn-rating-component

Basic Example

import React, {useState} from 'react';
import Rating from 'rn-rating-component'

export const Rn_Rating_Component_Example =()=> {
      const [rate, setRate] = useState(null);
      return (
       <Rating
        maxrating={5}
        size={30}
        defaultrate={rate}
        onChangeRate={setRate}
      />
  );
}

Features

  • two default modes
  • uri string for custom icons
  • fully customisable style and props
  • Highly functional

Documentation

The default icons are from react-native-vector-icons.see the demo app inside the directory rating_test_app/App.js you can find all the usage examples in the same file of the demo app.for customiconfilled and customiconoutline prop pass in the icon name from react-native-vector-icons/MaterialIcons.

Usage

Props

Prop Type Default Description
color String #900 Required for default and custom icons,it'll be ignored if isurlpresent prop set to true
customiconfilled String undefined Used for custom filled icon,it'll override default icons
customiconoutline String undefined Used for custom outline icon,it'll override default icons
defaultrate Number 0 Default rate for filled icons and it's required
filledurl Uri undefined Uri string for filled png / svg icons to be used, this will work if isurlpresent prop set to true.
isurlpresent Boolean false Used for custom image icons,
maxrating Number 5 Maximum icons or ratings to be rendered
mode String star Used for defaults mode options can be either 'star' or 'heart'
onChangeRate function undefined It's required for handling change in icons and is required
outlineurl Uri undefined Uri string for outline png / svg icons to be used, this will work if isurlpresent prop set to true.
parentstyle Style flexDirection:'row' This style will apply to total component, use this for handling parent View of the component
size Number 30 Will be used for changing size of the icons, ignored if isurlpresent set to true
style Style undefined Style for icons,for ex margin:2, this will render icons with margin of 2.
key Number undefined key prop,

Advanced Example

import React, { useState } from "react";
import Rating from "rn-rating-component";

export const Rn_Rating_Component_Example = () => {
  const [rate, setRate] = useState(null);
  
  console.log(rate);

  return (
    <Rating
      maxrating={5}
      onChangeRate={setRate}
      defaultrate={rate}
      isurlpresent={true}
      filledurl=""
      outlineurl=""
    />
  );
};

Demo App Installation

cd rating_test_app
npm install --save
npx react-native start
npx react-native run-android

Contributing

Contributions are always welcome! Please adhere to this project's code of conduct.

Support

For support, create an issue

You might also like...

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)

Sentinel: The Sentinel of Your Microservices Introduction As distributed systems become increasingly popular, the reliability between services is beco

Dec 31, 2022

The metric correlation component of Etsy's Kale system

The metric correlation component of Etsy's Kale system

Oculus is an Archived Project Oculus is no longer actively maintained. Your mileage with patches may vary. Oculus Oculus is the anomaly correlation co

Oct 14, 2022

A JavaFX 3D Visualization and Component Library

A JavaFX 3D Visualization and Component Library

FXyz3D FXyz3D Core: FXyz3D Client: FXyz3D Importers: A JavaFX 3D Visualization and Component Library How to build The project is managed by gradle. To

Aug 23, 2020

A grid component for javafx

Grid Grid is a JavaFX (8) component that is intended for different kinds of small games that are based on a grid of squares like chess or sudoku. Exam

Sep 19, 2022

A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

Sep 1, 2022

FastKV is an efficient and reliable key-value storage component written with Java.

FastKV 中文文档 FastKV is an efficient and reliable key-value storage component written with Java. It can be used on platforms with JVM environment, such

Dec 28, 2022

RXControls is a JavaFX custom component library.

RXControls is a JavaFX custom component library.

RXControls RXControls Version 8.x.y need javafx8 RXControls Version 11.x.y need javafx11+ 一个javafx的自定义组件库, 密码可见组件, 轮播图组件, 动态按钮组件等, 音频频谱可视化组件,歌词组件 等...

Jan 1, 2023

A straight table component designed for performance

@qlik-oss/react-native-simple-grid A straight table component designed for performance Installation npm install @qlik-oss/react-native-simple-grid Usa

Apr 23, 2022

An open-source component of TabLight project "Base-API"

DataAddons is a library (or framework?) created for Minecraft providing comfortable abstractions making additions over already existing data, generally, it is anti-pattern ans YOU SHOULDN'T USE IT in normal programms.

Mar 8, 2022

MiniMessage Component-based Placeholders for PaperMC and Velocity platforms

MiniMessage Component-based Placeholders for PaperMC and Velocity platforms

Dec 28, 2022

Java Desktop (JavaFX and Swing) Component Inspector

Java Desktop (JavaFX and Swing) Component Inspector

Java Desktop (JavaFX and Swing) Component Inspector A Tool for help you to inspect the location and properties of certain components in a window hiera

Oct 28, 2022

NPM Package - A react native component that let you to add a wavy background UI.

NPM Package - A react native component that let you to add a wavy background UI.

react-native-wavy-background A react native component that let you to add a wavy background UI. Installation npm install react-native-wavy-background

Oct 19, 2022

Insanely fast ECS (Entity Component System) for Java

Insanely fast ECS (Entity Component System) for Java

|) () |\/| | |\| | () |\| Dominion is an Entity Component System library for Java. Entity Component System architecture promotes data-oriented program

Jan 3, 2023

GalaxyCDC is a core component of PolarDB-X which is responsible for global binary log generation, publication and subscription.

中文文档 What is ApsaraDB GalaxyCDC ? GalaxyCDC is a core component of PolarDB-X which is responsible for global binary log generation, publication and su

Dec 19, 2022

An awesome native wheel picker component for React Native.

An awesome native wheel picker component for React Native.

⛏️ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

Dec 4, 2022

Simple Ini Parser for Java or SIni4j is a simple INI parse made in Java

Simple Ini Parser for Java or SIni4j is a simple INI parse made in Java

Simple Ini Parser for Java or SIni4j is a simple INI parse made in Java, built for provide a simple and easiest way to load INI files in Java

Mar 18, 2022

Java port of Brainxyz's Artificial Life, a simple program to simulate primitive Artificial Life using simple rules of attraction or repulsion among atom-like particles, producing complex self-organzing life-like patterns.

Java port of Brainxyz's Artificial Life, a simple program to simulate primitive Artificial Life using simple rules of attraction or repulsion among atom-like particles, producing complex self-organzing life-like patterns.

ParticleSimulation simple Java port of Brainxyz's Artificial Life A simple program to simulate primitive Artificial Life using simple rules of attract

Oct 5, 2022

A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation

Configurate Configurate is a simple configuration library for Java applications that provides a node-based representation of data, able to handle a wi

Jan 3, 2023
Owner
Yuva raghav
Engineer, Full Stack Developer.
Yuva raghav
Simple, efficient Excel to POJO library for Java

ZeroCell ZeroCell provides a simple API for loading data from Excel sheets into Plain Old Java Objects (POJOs) using annotations to map columns from a

Credit Data CRB 68 Dec 8, 2022
100% Java, Lambda Enabled, Lightweight Rules Engine with a Simple and Intuitive DSL

RuleBook » A Simple & Intuitive Rules Abstraction for Java 100% Java · Lambda Enabled · Simple, Intuitive DSL · Lightweight Why RuleBook? RuleBook rul

Delivered Technologies Labs 666 Dec 21, 2022
Simple LaTeX filter for OmegaT

Simple LaTeX filter plugin for OmegaT What is it? This plugin implements a subset of LaTeX syntax as OmegaT file filter. Translated content is expecte

Lev Abashkin 4 May 24, 2022
A simple java JSON deserializer that can convert a JSON into a java object in an easy way

JSavON A simple java JSON deserializer that can convert a JSON into a java object in an easy way. This library also provide a strong object convertion

null 0 Mar 18, 2022
A simple java json configuration system built with gson.

Simple Configuration A simple json configuration system built with gson. Setup ?? Using Maven REPOSITORY <repositories> <repository> <id>j

Kacper Horbacz 2 Sep 24, 2022
A simple JAVA HTTP requests tool.

JAVA-HTTP Hello ?? I made this very simple tool to start studying HTTP requests in JAVA. You need JAVA 18 to be able to test it: Download JAVA Functio

Ghost 9 Oct 16, 2022
DM Movie is an app with several movies catalogued through a database, you enter your email and your rating of the movie

DM Movie is an app with several movies catalogued through a database, you enter your email and your rating of the movie

Davi M. G. de Almeida 5 Jan 28, 2022
Sceneform React Native AR Component using ARCore and Google Filament as 3D engine. This the Sceneform Maintained Component for React Native

Discord Server Join us on Discord if you need a hand or just want to talk about Sceneform and AR. Features Remote and local assets Augmented Faces Clo

SceneView Open Community 42 Dec 17, 2022
Ultimate Component Suite for JavaServer Faces

PrimeFaces This is an overview page, please visit PrimeFaces.org for more information. Overview PrimeFaces is one of the most popular UI libraries in

PrimeFaces 1.5k Jan 3, 2023
Apache Wicket - Component-based Java web framework

What is Apache Wicket? Apache Wicket is an open source, java, component based, web application framework. With proper mark-up/logic separation, a POJO

The Apache Software Foundation 657 Dec 31, 2022