Search Feedback
Collect user ratings for search quality.
Documentation
Give feedback to the search quality
Use ff-search-feedback to let customers rate their search experience. The element provides two slots.
caption
Use caption for the element label. The complete slot is clickable. Selecting it slides out the caption and slides in the content slot.
content
Use content for the rating controls. It must include two HTML elements for positive and negative ratings. Any HTML element works when it has data-positive or data-negative. The component listens for clicks on these elements and updates its state.
The default rating is positive. It remains positive when the user does not select an option.
To collect feedback text, add data-message to an HTML element with a value property. Add data-send to an element that sends the feedback when selected.
<ff-search-feedback align="right" unresolved reset-on-toggle reset-on-send>
<div slot="caption">
<span>Feedback</span>
</div>
<div slot="content">
<p>Did you find what you were looking for?</p>
<fieldset>
<input type="radio" id="pos" name="positive" value="positive" checked data-positive>
<label for="pos"> Yes</label><br>
<input type="radio" id="neg" name="positive" value="negative" data-negative>
<label for="neg"> No</label><br>
<textarea rows="4" cols="15" maxlength="150" data-message></textarea>
</fieldset>
<button data-send>Rate</button>
<button data-toggle>Cancel</button>
</div>
</ff-search-feedback>Add data-toggle to any HTML element that should toggle the opened property of ff-search-feedback.
Demo
Try the Search Feedback demo.
API code
Properties
Methods
Events
Directives
Last updated
Was this helpful?