atomic-rating-facet
atomic-rating-facet
This is for:
DeveloperA facet is a list of values for a certain field occurring in the results, ordered using a configurable criteria (e.g., number of occurrences).
An atomic-rating-facet
displays a facet of the results for the current query as ratings.
It only supports numeric fields.
Introduction
A facet allows users to drill down inside a result set by filtering the result to certain field values. The Rating Facet component displays a facet of the results for the current query as ratings.
User Experience and Best Practices
-
Use the Rating Facet when social proof is important in guiding the user’s decisions.
-
Ratings help users understand what others think, or how they have rated the item.
-
The Rating Facet only works with numeric field values.
Guidelines
Don’t use a range that’s too large, we recommend that you keep it below ten. A five star rating system is ideal; this is a common system that’s familiar to most people.
Use Cases and Examples
On an ecommerce website, a user may want to filter their results to display only the items that have a rating of four stars or above.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
|
The required facets and values for this facet to be displayed. Examples:
|
|
|
|
|
|
Whether to display the facet values as checkboxes (multiple selection) or links (single selection). Possible values are 'checkbox' and 'link'. |
|
|
|
|
Specifies a unique identifier for the facet. |
|
|
|
|
The field whose values you want to display in the facet. |
|
|
|
|
Whether to exclude the parents of folded results when estimating the result count for each facet value. |
|
|
|
|
The heading level to use for the heading over the facet, from 1 to 6. |
|
|
|
|
The SVG icon to use to display the rating.
When using a custom icon, at least part of your icon should have the color set to
|
|
|
|
|
The maximum number of results to scan in the index to ensure that the facet lists all potential facet values.
Note: A high injectionDepth may negatively impact the facet request performance.
Minimum: |
|
|
|
|
Specifies whether the facet is collapsed. When the facet is the child of an |
|
|
|
|
The non-localized label for the facet.
Used in the |
|
|
|
|
The maximum value in the field’s index and the number of rating icons to display in the facet. If not assigned a value, this property will default to the same value as |
|
|
|
|
The minimum value of the field. |
|
|
|
|
The number of options to display in the facet. If |
|
|
|
|
The tabs on which this facet must not be displayed. This property should not be used at the same time as Set this property as a stringified JSON array, e.g.,
If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet won’t be displayed on any of the specified tabs. |
|
|
|
|
The tabs on which the facet can be displayed. This property should not be used at the same time as Set this property as a stringified JSON array, e.g.,
If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet can only be displayed on the specified tabs. |
|
|
Shadow Parts
Part | Description |
---|---|
|
The button that resets the actively selected facet values. |
|
The clear button icon. |
|
The wrapper for the entire facet. |
|
The button that displays the label and toggles to expand or collapse the facet. |
|
The label button icon. |
|
The placeholder shown before the first search is executed. |
|
The facet value checkbox, available when display is 'checkbox'. |
|
The checked facet value checkbox, available when display is 'checkbox'. |
|
The facet value checkbox icon, available when display is 'checkbox'. |
|
The facet value checkbox clickable label, available when display is 'checkbox'. |
|
The facet value count, common for all displays. |
|
The facet value when display is 'link'. |
|
The selected facet value when display is 'link'. |
|
The facet value rating, common for all displays. |
|
The facet values container. |
CSS Custom Content
Name | Description |
---|---|
|
Size of the checkbox. |
|
Color of the icon when active. |
|
Color of the icon when inactive. |
|
Color of the icon’s outline. |