agileverse-feedback
v0.0.8
Published
Agileverse feedback Web component
Downloads
126
Readme
Agileverse Feedback
this component is built to help you collect feedback from your customers or team.
getting started
just go to the agileverse feedback page and signup and create your own feedback form, then connect ypur key to this web-component and after thet everything will works fine.
setup
First you need to add your website origins in allowed origin in your admin panel.
next you have to provide your key to the web component:
const key= "PUT_YOR_KEY_HERE";
const agileverseFeedbackDom = document.querySelector('agileverse-feedback');
agileverseFeedbackDom.key = key;
after this, component will request for your feedback form data and show the result.
if any error happen in this process component will print it in your debug console.
change text contents of the component
there is 2 way to change content of the titles and input labels or placeholders:
- using agileverse portal form builder page.
- pass texts directly via attribute to web-component
due to different scenarios in the websites that may requires developers to change texts and style for different user we prioritize attribute over server data so if you set any value by attribute; the server value will be ignored.
pass by attribute
to pass text via attributes you just have to set html attribute like this:
<agileverse-feedback title="My Feedback Title"></agileverse-feedback>
you can set all this attributes listed below:
| attribute | place |
|-------------------------|--------------------------------|
| title | title text of the feedback form|
| rate-description | it's set text above the rate icons (emojis or stars)|
| description-placeholder | set placeholder (low contrast text in the box when field is empty) of comment box|
| description-label | set label text of comment box |
| description-message | set comment box under text message |
| submit-button-text | set submit button text |
| thanks-cta-text | when user submit form he will see thanks message this is the text inside call to action button in there|
| thanks-cta-link | thanks Call to action button link|
| thanks-title | title of thanks section |
| thanks-subtitle | subtitle of thanks section|
customize component ui
agileverse feedback have 2 default theme `dark` & `light` you can set it by dom attribute or through js:
```html
<agileverse-feedback theme="light"></agileverse-feedback>
```
beside theme you can customize component ui by css variables. here is the available variables:
| variable | place | |---------------------------------------|--------------------------------| | --av-feedback-bg | background of feedback component | | --av-feedback-title-color | title text color| | --av-feedback-description-color | description text color| | --av-feedback-success-text-color | success text color | | --av-feedback-button-bg-color | button bg color | | --av-feedback-button-bg-color-hover | button bg color on mouse hover|
advance usages:
here is some advance usages that most user never need them but in some edge cases you may need it.
show and hide success panel
in some case when you know your user submitted feedback before, or you just want to check design of success message. you can set submittedSuccessfully
to true/false to show or hide success message.
feedbackDom.submittedSuccessfully = true;