@kobee/feedback-widget
v1.0.20
Published
The Kobee feedback widget
Downloads
9
Maintainers
Readme
The Kobee feedback widget
visit https://www.kobee.io for more information.
You can use the Kobee widget in several ways:
- initialize the widget, and allow us to handle UI to show/hide of the feedback form
- manually call a function to show/hide feedback form
Getting started
Include the npm module in your application:
with npm:
npm install @kobee/feedback-widget
with yarn:
yarn add @kobee/feedback-widget
Initialize the widget
If you don't need manual control over when to show/hide the widget, you can simply initialize and pass your organizationId into the configuration object.
const initWidget = require('@kobee/feedback-widget').default
const widget = initWidget({ organizationId: '123456789' }) // Found in organization settings
Manually show/hide the feedback form
If you need more control over when to show/hide the form, you can hide the default collapsed state:
const initWidget = require('@kobee/feedback-widget').default
const widget = initWidget.init({
organizationId: '123456789',
hideCollapsed: true // hide the collapsed state
})
You can then manually trigger showing/hiding/toggling the form:
widget.show()
widget.hide()
widget.toggle()