Giter Site home page Giter Site logo

9subsfisviore / vuefeedbackreaction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivansotelo/vuefeedbackreaction

0.0 0.0 0.0 3.97 MB

Helps you to collect feedback and leads using the most spoken language in the world: the emoji.

Home Page: https://ivansotelo.github.io/VueFeedbackReaction/

License: MIT License

JavaScript 34.38% HTML 4.34% Vue 50.65% Stylus 10.63%

vuefeedbackreaction's Introduction

VueFeedbackReaction

Helps you to collect feedback and leads using the most spoken language in the world: the emoji.

Codacy Badge NPMVERSION GITHUBSTARS MadeWithVueJs.com shield BUILD DOWNLOADS Build Status

This project is inspired by Feedback Reactions from Mohammad Amiri

Installation

# Install with npm
$ npm i -S vue-feedback-reaction

# or yarn
$ yarn add vue-feedback-reaction

Note: This project exports two components, VueFeedBackReaction, which is the feedback component itself, and VueReactionEmoji, if you'd like to use a single emoji. If you install using Vue.use, you will only get VueFeedbackReaction component.

Usage

VueFeedbackReaction

<template>
  <div class="app">
    <vue-feedback-reaction v-model="feedback" />
  </div>
</template>

<script>
  import { VueFeedbackReaction } from 'vue-feedback-reaction';

  export default {
    name: 'demo',
    components: {
      VueFeedbackReaction
    },
    data: () => ({
      feedback: ''
    })
  };
</script>

Props

Property name Type Default Description
value String, Number '' Input value (v-model)
labels Array [] Array of strings that set labels below each emoji reaction, starting from the left
labelClass Object, Array, String '' Only works if you are using the labels prop. Set a v-bind:class to all the labels
emojiWidth String, Number '' Set a width for all emojis
emojiHeight String, Number '' Set a height for all emojis
containerWidth String, Number '' Set the containers width
containerHeight String, Number '' Set the containers height

VueReactionEmoji

<template>
  <div class="app">
    <vue-reaction-emoji :reaction="reaction" :is-active="isActive" :is-disabled="isDisabled" />
  </div>
</template>

<script>
  import { VueReactionEmoji } from 'vue-feedback-reaction';

  export default {
    name: 'demo',
    components: {
      VueReactionEmoji
    },
    data: () => ({
      reaction: 'natural',
      isActive: false,
      isDisabled: false
    })
  };
</script>

Props

Property name Type Default Description
reaction String 'natural' Reaction of the emoji. Must be either hate, disappointed, natural, good or excellent
is-active Boolean false If you want the emoji to start with it's active state, set it to true
is-disabled Boolean false If you want the emoji to have no hover or click state, set it to true
width String, Number '' Set the emojis width
height String, Number '' Set the emojis height

Events

It emits an @input event when you click an emoji, if is-disabled is set to false.

License

The MIT License (MIT)

Copyright (c) 2019 Ivan Sotelo Vargas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

vuefeedbackreaction's People

Contributors

ivansotelo avatar dependabot[bot] avatar guastallaigor avatar shin4488 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.