All Projects → thedevelobear → React Rewards

thedevelobear / React Rewards

Package containing a few microinteractions you can use to reward your users for little things and make them smile!

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Rewards

Patternfly Design
Use this repo to file all new feature or design change requests for the PatternFly project
Stars: ✭ 82 (-90.25%)
Mutual labels:  ux, user-experience, front-end
You Dont Know Ui
Learn how to build universal, modern and scalable user interfaces
Stars: ✭ 140 (-83.35%)
Mutual labels:  ux, user-experience
Xamarin.forms.breadcrumb
This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs.
Stars: ✭ 130 (-84.54%)
Mutual labels:  ux, user-experience
Material Theme
Material Theme, the most epic theme for Sublime Text 3 by Mattia Astorino
Stars: ✭ 11,093 (+1219.02%)
Mutual labels:  ux, user-experience
Spionio
Lightweight focus group management platform that can capture and replay user interaction on your site and improve the UX in everything you build
Stars: ✭ 40 (-95.24%)
Mutual labels:  user-experience, front-end
meshery.io
Site for Meshery, the cloud native management plane
Stars: ✭ 135 (-83.95%)
Mutual labels:  front-end, ux
Beautiful React Hooks
🔥 A collection of beautiful and (hopefully) useful React hooks to speed-up your components and hooks development 🔥
Stars: ✭ 5,242 (+523.31%)
Mutual labels:  react-components, front-end
reactjs-portfolio
Welcome to my portfolio react.js repository page.
Stars: ✭ 109 (-87.04%)
Mutual labels:  front-end, react-components
UI-UX-Squad
UI/UX Squad Roadmap
Stars: ✭ 30 (-96.43%)
Mutual labels:  ux, user-experience
billing-form
Demo page for user-friendly billing form features
Stars: ✭ 23 (-97.27%)
Mutual labels:  front-end, ux
Realityui
A Swift Package for creating familiar UI Elements and animations in a RealityKit rendered Augmented Reality or Virtual Reality scene.
Stars: ✭ 275 (-67.3%)
Mutual labels:  ux, user-experience
Hover Ui Kit
Create beautiful user interfaces for immersive VR/AR experiences.
Stars: ✭ 662 (-21.28%)
Mutual labels:  ux, user-experience
Use Web Animations
😎 🍿 React hook for highly-performant and manipulable animations using Web Animations API.
Stars: ✭ 802 (-4.64%)
Mutual labels:  ux
Scrollupfolder
A firefox addon wich goes up a folder of a website.
Stars: ✭ 18 (-97.86%)
Mutual labels:  ux
Computer Science
Contains the basic fundamental data structures and algorithms a front end engineer should know, written all in JavaScript.
Stars: ✭ 798 (-5.11%)
Mutual labels:  front-end
Wix Style React
A collection of React components that conform to Wix Style.
Stars: ✭ 798 (-5.11%)
Mutual labels:  react-components
Notification
notification with socket.io
Stars: ✭ 24 (-97.15%)
Mutual labels:  front-end
Base
React-UI-Kit - frontend library with ReactJS components
Stars: ✭ 18 (-97.86%)
Mutual labels:  react-components
Neteasecloudmusic
React Native 模仿网易云音乐手机客户端,兼容安卓和IOS两个平台。
Stars: ✭ 793 (-5.71%)
Mutual labels:  front-end
Slim.js
Fast & Robust Front-End Micro-framework based on modern standards
Stars: ✭ 789 (-6.18%)
Mutual labels:  front-end

react-rewards logo

npm version forthebadge

Demo available here!

Usage

This package was built using React-Pose, react-dom-confetti and Lottie-web.

Why should I use that? Read my blog post and you will know – https://www.thedevelobear.com/post/microinteractions/

Install from npm by typing npm install react-rewards or yarn add react-rewards while in your package.json directory.

This package lets you add microinteractions to your app, and rewards users with the rain of confettis, flying emoji or memphis design particles in seconds. In order to make it rain, you need to wrap your button of choice with the <Reward> component, fire the rewardMe() method from the refs and voilà. You can also "punish" the user by calling the punishMe() method and showing them that something went wrong.

react-rewards demo

import Reward from 'react-rewards';

// in render
<Reward
  ref={(ref) => { this.reward = ref }}
  type='emoji'
>
  <button onClick={this.fetchSomeData} />
</Reward>

// in fetchSomeData:
// to reward a user with confetti/emoji/memphis rain:
this.reward.rewardMe();
// to "punish" user :
this.reward.punishMe();

Props & config

Basic props:

name type description required default
ref func function that creates a ref of the reward component yes
type string 'confetti', 'emoji' or 'memphis' no 'confetti'
config object a configuration object described below no see below

Config object:

name type description default (confetti / emoji)
lifetime number time of life of each particle in ms 200 / 200
angle number initial direction of particles in degrees 90 / 90
decay number how much the velocity decreases with each frame 0.91 / 0.91
spread number spread of particles in degrees 45 / 100
startVelocity number initial velocity of particles 35 / 20
elementCount number particles quantity 40 / 15
elementSize number particle size in px 8 / 20
zIndex number z-index of particles 10 / 10
springAnimation bool whether the button should be animated true
colors array An array of colors used when generating confettis
emoji array An array of emoji used when generating emoji particles
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].