Vue- Perks - Vue.js Feed #.\n\nVue-rewards permits you add micro-interactions to your Vue 3 application, and also incentives consumers along with the rain of confetti, emoji or balloons in seconds.\n\nVue 3 only. Not appropriate along with Vue 2.\nThis package deal is actually a slot of react-rewards.\nDemonstration.\nListed below is actually an easy trial as well as here's the code for the trial.\nAbout.\nvue-rewards allows you include micro-interactions to your application, and also perks consumers with the storm of confetti, emoji or even balloons in seconds.\nShooting confetti all over the webpage might look like a suspicious concept, however always remember that satisfying customers for their actions is actually certainly not.\nIf a large cloud of smiling emoji does not suit your use effectively, try altering the physics config to create it much more refined.\nYou can find out more when it come to micro-interactions in my blog-- https:\/\/www.thedevelobear.com\/post\/microinteractions\/.\nSetup.\npnpm put in vue-rewards.\nor even.\nyarn incorporate vue-rewards.\nor.\nnpm put up vue-rewards.\nIf you intend to utilize this along with the Options API at that point you will need to add the following code to your main.js (or you may locate the plugin sign up in plugins\/index. js):.\nimport createApp coming from \"vue\".\nbring in App coming from \".\/ App.vue\".\nimport VueRewards from \"vue-rewards\".\n\/\/ your various other plugins will certainly be actually imported here.\n\nconst app = createApp( App).\n\n\/\/ This is actually the almost all.\napp.use( VueRewards).\n\napp.mount(\" #app\").\nConsumption.\nIn order to utilize the perks, you'll require to provide an element that will end up being the source of the computer animation. This factor needs to have an i.d. that matches the one made use of - it can be anywhere in the DOM as long as the I.d. suit.\nYou can easily place the element inside a button, facility it and also skyrocket from the button.\nYou can easily put it on top of the viewport along with position: \"dealt with\" as well as transform the perspective to 270, to shoot downwards.\nTry, experiment, enjoy yourself!\nComputer animation fragments are actually readied to setting: 'repaired' by nonpayment, yet this may be altered through a config things.\nYou may use this bundle in both the make-up API and also the options API.\nMaking Use Of the Make-up API.\n\n\n\nPermit's commemorate!\n\nClick me!\n\n\nUtilizing the Options API.\nGiven that our company enrolled the plugin earlier we presently possess accessibility to the $reward technique in our components. $reward is the same as useReward. To obtain the same as above our team perform:.\n\nLet's celebrate!\n\nClick me!\n\n\n\n\nProps & config.\nuseReward\/$ incentive params:.\ntitle.\nkind.\ndescription.\nrequired.\nnonpayment.\ni.d..\ncord.\nAn unique i.d. of the aspect you would like to shoot coming from.\nyes.\n\ntype.\ncord.\n' confetti'.\n' balloons'.\n'em oji'.\nyes.\n' confetti'.\nconfig.\nitem.\nan arrangement item defined below.\nno.\nview listed below.\nConfetti config things:.\nname.\nkind.\nclassification.\ndefault.\nlifetime.\nnumber.\ntime of lifestyle.\n200.\nperspective.\nvariety.\ninitial direction of fragments in degrees.\n90.\ndegeneration.\nvariety.\nthe amount of the speed lowers with each framework.\n0.94.\nspread.\namount.\nspreading of bits in levels.\n45.\nstartVelocity.\nnumber.\npreliminary speed of particles.\n35.\nelementCount.\namount.\nfragments volume.\n50.\nelementSize.\nvariety.\nfragment measurements in px.\n8.\nzIndex.\nnumber.\nz-index of fragments.\n0\nposition.\nstring.\nsome of CSSProperties [' setting'] - e.g. \"complete\".\n\" taken care of\".\ncolors.\nstring [] An array of colours utilized when producing confetti.\n[#A 45BF1', '# 25C6F6', '# 72F753', '#F 76C88', '#F 5F770'] onAnimationComplete.\n() => space.\nA feature that runs when animation completes.\nboundless.\nBalloons config item:.\nname.\nkind.\nclassification.\ndefault.\nlife-time.\nnumber.\ntime of lifestyle.\n600.\nviewpoint.\namount.\nfirst instructions of balloons in levels.\n90.\ndecay.\nnumber.\nthe amount of the velocity decreases with each structure.\n0.999.\nspreading.\nvariety.\nspreading of balloons in levels.\n50.\nstartVelocity.\namount.\ninitial rate of the balloons.\n3.\nelementCount.\nnumber.\nballoons amount.\n10.\nelementSize.\namount.\nballoons measurements in px.\nTwenty.\nzIndex.\nnumber.\nz-index of balloons.\n0\nplacement.\nstring.\nsome of CSSProperties [' placement'] - e.g. \"downright\".\n\" corrected\".\nshades.\nstrand [] A range of colors made use of when generating balloons.\n[#A 45BF1', '# 25C6F6', '# 72F753', '#F 76C88', '
F 5F770'] onAnimationComplete.() => space.A function that runs when animation finishes.boundless.Emoji config things:.title.kind.description.default.life-time.variety.opportunity of lifestyle.200.perspective.variety.first path of emoji in levels.90.degeneration.variety.how much the rate lowers with each frame.0.94.spread.amount.spread of emoji in degrees.Forty five.startVelocity.variety.first velocity of emoji.35.elementCount.amount.emoji amount.20.elementSize.amount.emoji measurements in px.25.zIndex.amount.z-index of emoji.0placement.strand.one of CSSProperties [' placement'] - e.g. "complete"." corrected".emoji.string [] An array of emoji to shoot.onAnimationComplete.() => space.A function that runs when computer animation finishes.boundless.