4.0.0 • Published 2 years ago

react-feedback-widget v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SerVoice React Feedback Widget

A react wrapper for the SerVoice feedback widget. Easily collect and organize feedback from your visitors and users.

Need an account? Sign up here.

Servoice Feedback Demo

Installation

npm

npm i react-feedback-widget

Usage

Import the component:

import { ServoiceFeedback } from 'react-feedback-widget';

Set your config:

const config = {
  servId: '1111111',
  servPID: 'kjh34kl2jh4kj234',
  userEmail: 'test@feedbackisgreat.com',
  userFirstName: 'David',
  userLastName: 'Groechel',
};
KeyValueTypeRequired
servIdYour SerVoice portal IdStringYes
servPIDThe SerVoice project IdStringYes
userEmailThe identified user in your appStringOptional
userFirstNameThe first name of the identitfied userStringOptional
userLastNameThe last name of the identified userStringOptional

 

Wrap your component

<ServoiceFeedback config={config}>
  <button type="button">Feedback?</button>
</ServoiceFeedback>

 

Note: There can only be one child element and it must emit a click event

 

Full Example

import { ServoiceFeedback } from 'react-feedback-widget';

function App() {
  const config = {
    servId: '1111111',
    servPID: 'kjh34kl2jh4kj234',
    userEmail: 'test@feedbackisgreat.com',
    userFirstName: 'David',
    userLastName: 'Groechel',
  };
  return (
    <div className="App">
      <ServoiceFeedback config={config}>
        <button type="button">Feedback</button>
      </ServoiceFeedback>
    </div>
  );
}

export default App;

Code Sandbox Example

About

This project is maintained by David Groechel and SerVoice.